=== modified file 'src/libnrtype/FontFactory.cpp' --- src/libnrtype/FontFactory.cpp 2010-11-17 02:12:56 +0000 +++ src/libnrtype/FontFactory.cpp 2011-03-18 03:45:18 +0000 @@ -371,7 +371,9 @@ PangoFontDescription *copy = pango_font_description_copy(font); pango_font_description_unset_fields (copy, PANGO_FONT_MASK_SIZE); - pangoString = Glib::ustring(pango_font_description_to_string(copy)); + char * copyAsString = pango_font_description_to_string(copy); + pangoString = Glib::ustring(copyAsString); + g_free(copyAsString); pango_font_description_free(copy); @@ -420,8 +422,10 @@ pango_font_description_unset_fields(fontDescrCopy, PANGO_FONT_MASK_SIZE); // For now, keep it as style name taken from pango - style = pango_font_description_to_string(fontDescrCopy); + char *fontDescrAsString = pango_font_description_to_string(fontDescrCopy); + style = Glib::ustring(fontDescrAsString); + g_free(fontDescrAsString); pango_font_description_free(fontDescrCopy); } @@ -745,7 +749,9 @@ } } } + g_free(faces); } + g_free(families); // Sort the style lists for (FamilyToStylesMap::iterator iter = map->begin() ; iter != map->end(); iter++) {