Patch for leaks in gtkhtml.c

Kjartan Maraas <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1155736003.28210.2.camel@rivendell>
Found by valgrind and is in exactly the same code that lives in
e-util.c. Any reason why this is duplicated?

Cheers
Kjartan

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
gtkhtml.c-leaks.patch (text/x-patch, 896 B)
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.622
diff -u -p -r1.622 gtkhtml.c
--- gtkhtml.c	24 Jul 2006 16:33:05 -0000	1.622
+++ gtkhtml.c	15 Aug 2006 22:54:46 -0000
@@ -832,6 +832,9 @@ get_font_options ()
 		else
 			cairo_font_options_set_subpixel_order (font_options, CAIRO_SUBPIXEL_ORDER_DEFAULT);
 	}
+	g_free (antialiasing);
+	g_free (hinting);
+	g_free (subpixel_order);
 	g_object_unref (gconf);
 	return font_options;
 }
@@ -2374,7 +2377,7 @@ client_notify_spell_widget (GConfClient*
 
 	if (!strcmp (tkey, "/language")) {
 		g_free (prop->language);
-		prop->language = g_strdup (gconf_client_get_string (client, entry->key, NULL));
+		prop->language = gconf_client_get_string (client, entry->key, NULL);
 		if (!html->engine->language)
 			gtk_html_api_set_language (html);
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.