[evolution-patches] [gtkhtml] leak fix
- From: Radek Doulik <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Rodrigo Moya <rodrigo novell com>, Rodney Dawes <dobey novell com>
- Subject: [evolution-patches] [gtkhtml] leak fix
- Date: Thu, 28 Apr 2005 16:49:33 +0530
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2059
diff -u -p -r1.2059 ChangeLog
--- ChangeLog 23 Nov 2004 14:06:21 -0000 1.2059
+++ ChangeLog 29 Nov 2004 15:52:39 -0000
@@ -1,3 +1,9 @@
+2004-11-29 Radek Doulik <rodo ximian com>
+
+ * htmlengine.c: make sure we free whole array from g_strsplit
+
+ * htmltext.c (html_text_pango_info_destroy): free entries as well
+
2004-11-23 Radek Doulik <rodo ximian com>
* htmlimage.c (html_image_real_calc_size): use
Index: htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.621
diff -u -p -r1.621 htmlengine.c
--- htmlengine.c 11 Nov 2004 17:09:38 -0000 1.621
+++ htmlengine.c 29 Nov 2004 15:52:39 -0000
@@ -289,18 +289,12 @@ html_element_new (HTMLEngine *e, const c
if (!g_hash_table_lookup (element->attributes, lower)) {
DE (g_print ("attrs (%s, %s)", attr[0], attr[1]));
- g_hash_table_insert (element->attributes, lower, attr[1]);
-
- /* just free the array */
- g_free (attr[0]);
- g_free (attr);
- } else {
- /* free the whole vector */
- g_strfreev (attr);
+ g_hash_table_insert (element->attributes, lower, g_strdup (attr[1]));
+ } else
g_free (lower);
- }
}
+ g_strfreev (attr);
}
return element;
Index: htmltext.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltext.c,v
retrieving revision 1.268
diff -u -p -r1.268 htmltext.c
--- htmltext.c 11 Nov 2004 17:09:38 -0000 1.268
+++ htmltext.c 29 Nov 2004 15:52:54 -0000
@@ -98,6 +98,7 @@ html_text_pango_info_destroy (HTMLTextPa
pango_item_free (pi->entries [i].item);
g_free (pi->entries [i].widths);
}
+ g_free (pi->entries);
g_free (pi->attrs);
g_free (pi->face);
g_free (pi);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]