[cairo-commit] 2 commits - src/cairo-ft-font.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 14 15:58:48 UTC 2020


 src/cairo-ft-font.c |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 0ae4e6a8554ce7cc13ba0f23c516ddd7622f660a
Merge: d66baf8ec a68c19680
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Feb 14 16:58:15 2020 +0100

    Merge branch 'ft-leak' of gitlab.freedesktop.org:carlosgc/cairo

commit a68c19680e23fd916770c89abf50465f4c99d12b
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date:   Mon Nov 19 13:08:14 2018 +0100

    ft: Fix memory leak in _cairo_ft_unscaled_font_init
    
    FT_MM_Var returned by FT_Get_MM_Var needs to be freed.

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 325dd61b4..3f9244e95 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -459,6 +459,11 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled,
 		unscaled->variations = calloc (ft_mm_var->num_axis, sizeof (FT_Fixed));
 		if (unscaled->variations)
 		    FT_Get_Var_Design_Coordinates (face, ft_mm_var->num_axis, unscaled->variations);
+#if HAVE_FT_DONE_MM_VAR
+		FT_Done_MM_Var (face->glyph->library, ft_mm_var);
+#else
+		free (ft_mm_var);
+#endif
 	    }
 	}
 #endif


More information about the cairo-commit mailing list