[evolution-patches] Patch for leaks in gtkhtml



Attaching a patch for some leaks that showed up in a valgrind log here.

I'm not 100% sure about the html_object_set_data() one, but that was the
only place I could see a possibility for leakage in that area.

Cheers
Kjartan

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2130
diff -u -p -r1.2130 ChangeLog
--- ChangeLog	6 Jul 2005 10:34:19 -0000	1.2130
+++ ChangeLog	7 Jul 2005 09:57:07 -0000
@@ -1,3 +1,8 @@
+2005-07-07  Kjartan Maraas  <kmaraas gnome org>
+
+	* htmlclueflow.c: (write_item_marker): Plug a leak 
+	* htmlobject.c: (html_object_set_data): Same here.
+
 2005-07-06  Mengjie Yu  <meng-jie yu sun com>
 
 	* gtkhtml.c: (gtk_html_class_init):
Index: htmlclueflow.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlclueflow.c,v
retrieving revision 1.324
diff -u -p -r1.324 htmlclueflow.c
--- htmlclueflow.c	19 May 2005 09:22:25 -0000	1.324
+++ htmlclueflow.c	7 Jul 2005 09:57:07 -0000
@@ -1833,6 +1833,7 @@ write_item_marker (GString *pad_string, 
 			g_string_truncate (pad_string, len);
 
 		g_string_append (pad_string, marker);
+		g_free (marker);
 	}
 }
 
Index: htmlobject.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlobject.c,v
retrieving revision 1.191
diff -u -p -r1.191 htmlobject.c
--- htmlobject.c	31 Mar 2005 12:44:42 -0000	1.191
+++ htmlobject.c	7 Jul 2005 09:57:07 -0000
@@ -1772,7 +1772,7 @@ html_object_get_data_nocp (HTMLObject *o
 void
 html_object_set_data (HTMLObject *object, const gchar *key, const gchar *value)
 {
-	g_datalist_set_data_full (&object->object_data, key, g_strdup (value), g_free);
+	g_datalist_set_data_full (&object->object_data, key, value, g_free);
 }
 
 void





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]