grim/guifications2

Fix a leak when the contents of the theme aren't valid XML.
org.guifications.gf2
2009-04-12, Paul Aurich
71b2b4201b86
Parents 42aa4009a621
Children ccc1e450d780
Fix a leak when the contents of the theme aren't valid XML.

==2501== 7,153 bytes in 1 blocks are definitely lost in loss record 1,756 of 1,861
==2501== at 0x04c278ae: malloc (vg_replace_malloc.c:207)
==2501== by 0x09b122ab: g_file_get_contents (gfileutils.c:613)
==2501== by 0x112b7ba6: gf_theme_new_from_file (gf_theme.c:83)
==2501== by 0x112b7df9: gf_theme_probe (gf_theme.c:334)
==2501== by 0x112b8001: gf_themes_probe (gf_theme.c:372)
==2501== by 0x112beae6: gf_load (guifications.c:58)
==2501== by 0x07d1890b: purple_plugin_load (plugin.c:616)
==2501== by 0x07d193a0: purple_plugins_load_saved (plugin.c:1314)
==2501== by 0x00483e86: main (gtkmain.c:807)
--- a/src/gf_theme.c Sun Apr 05 05:17:35 2009 -0400
+++ b/src/gf_theme.c Sun Apr 12 20:33:19 2009 -0400
@@ -87,6 +87,7 @@
if(!(root = xmlnode_from_str(contents, length))) {
purple_debug_info("Guifications", "** Error: Could not parse file\n");
+ g_free(contents);
return NULL;
}