From: Marijn van Vliet Date: Thu, 3 Nov 2011 14:36:37 +0000 (+0100) Subject: Fix some memory leakage X-Git-Tag: v0.9~55 X-Git-Url: https://git.stderr.nl/gitweb?p=projects%2Fchimara%2Fchimara.git;a=commitdiff_plain;h=5cbd4d79bb8699746b85353d6ab25ee5c48174ff Fix some memory leakage --- diff --git a/libchimara/style.c b/libchimara/style.c index f944071..f9b231b 100644 --- a/libchimara/style.c +++ b/libchimara/style.c @@ -1120,19 +1120,21 @@ get_current_font(guint32 wintype) text_tag_to_attr_list( g_hash_table_lookup(styles, "default"), list ); PangoAttrIterator *it = pango_attr_list_get_iterator(list); pango_attr_iterator_get_font(it, font, NULL, NULL); + pango_attr_iterator_destroy(it); text_tag_to_attr_list( g_hash_table_lookup(styles, "normal"), list ); it = pango_attr_list_get_iterator(list); pango_attr_iterator_get_font(it, font, NULL, NULL); + pango_attr_iterator_destroy(it); text_tag_to_attr_list( g_hash_table_lookup(glk_styles, "glk-normal"), list ); it = pango_attr_list_get_iterator(list); pango_attr_iterator_get_font(it, font, NULL, NULL); + pango_attr_iterator_destroy(it); /* Make a copy of the family, preventing it's destruction at the end of this function. */ pango_font_description_set_family( font, pango_font_description_get_family(font) ); - pango_attr_iterator_destroy(it); pango_attr_list_unref(list); return font;