[evolution-patches] [gtkhtml] #69759, #69762 memory leaks fix
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] [gtkhtml] #69759, #69762 memory leaks fix
- Date: Wed, 01 Dec 2004 14:39:36 +0100
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2035.2.9
diff -u -p -r1.2035.2.9 ChangeLog
--- ChangeLog 18 Oct 2004 15:20:26 -0000 1.2035.2.9
+++ ChangeLog 1 Dec 2004 10:11:12 -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-10-13 Radek Doulik <rodo ximian com>
* htmlengine-edit-text.c (upper_lower): set text_len and
Index: htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.618
diff -u -p -r1.618 htmlengine.c
--- htmlengine.c 27 Aug 2004 12:59:50 -0000 1.618
+++ htmlengine.c 1 Dec 2004 10:11:13 -0000
@@ -287,18 +287,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.260.2.4
diff -u -p -r1.260.2.4 htmltext.c
--- htmltext.c 8 Oct 2004 13:23:12 -0000 1.260.2.4
+++ htmltext.c 1 Dec 2004 10:11:14 -0000
@@ -95,6 +95,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]