Subject: Re: bug#41627: 28.0.50; Emacs with cairo build segfault in HELLO file

From: Eli Zaretskii <[email-masked]>
Date: Mon, 01 Jun 2020 19:35:18 +0300

> From: Pip Cet <[email-masked]>
> Date: Sun, 31 May 2020 20:45:56 +0000
> Cc: Zihao Zhu <[email-masked]>, [email-masked]
> 
> > Can someone please propose a patch along these lines?  I cannot easily
> > test a Cairo build, so I won't try showing a patch.
> 
> How about this?

LGTM, thanks.  I gather that you tested this bail-out, and saw that it
does TRT (probably skipping the problematic font)?

> (I'm not sure how and whether `match' is supposed to be freed in the
> success case, or whether it's simply leaked).

>From some code fragments I see on the net, I think you are right, and
we should free it before returning.

Btw, there are more calls to cairo_ft_scaled_font_lock_face in our
code followed by unconditional dereference of the result...