From cc123550ca4ca4ee33e768ef1500edb1fe1d7aae Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 13 Feb 2018 15:04:42 -0600 Subject: [PATCH] bfo#105084 - Initialize memory properly in _cairo_ft_font_face_create_for_pattern() The font_face->ft_options field was not being initialized, leading to an invalid free(). https://bugs.freedesktop.org/show_bug.cgi?id=105084 --- src/cairo-ft-font.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 3c911cf39..79aef78f5 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -3254,6 +3254,9 @@ _cairo_ft_font_face_create_for_pattern (FcPattern *pattern) } font_face->unscaled = NULL; + + _get_pattern_ft_options (pattern, &font_face->ft_options); + font_face->next = NULL; font_face->pattern = FcPatternDuplicate (pattern); -- 2.16.1