See https://bugzilla.redhat.com/show_bug.cgi?id=862161 commit 677e8ab4086208f06b988d98b247aeb53e554638 Author: William Jon McCann <jmccann@redhat.com> Date: Tue Sep 11 00:21:34 2012 -0400 Don't leak pango languages Signed-off-by: Richard Hughes <richard@hughsie.com> diff --git a/contrib/gtk-module/pk-gtk-module.c b/contrib/gtk-module/pk-gtk-module.c index 8145848..2c93f02 100644 --- a/contrib/gtk-module/pk-gtk-module.c +++ b/contrib/gtk-module/pk-gtk-module.c @@ -252,8 +252,7 @@ pk_pango_fc_font_map_load_fontset (PangoFontMap *font_map, * code instead of "xx"... */ if (G_LIKELY (language == last_language) || language == NULL || - language == pango_language_from_string ("C") || - language == pango_language_from_string ("xx")) + pango_language_matches (language, "C;xx")) return fontset; if (G_UNLIKELY (!seen_languages)) The old code didn't leak - pango_language_from_string() doesn't return memory that needs to be free - and the new code doesn't work since it would have to be: pango_language_matches (language, "c;xx") to work - pango_language_matches() doesn't canonicalize the pattern.
Created attachment 68053 [details] [review] Patching fixing bug
Pushed to master, thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.