Free memory reading



Found in a purify run - patch attached should fix it.

-JP
--
--
=======================================================================
JP Rosevear				jpr ximian com
Ximian Inc.				http://www.ximian.com
? b.patch
? po/az.mo
? po/ca.mo
? po/da.mo
? po/de.mo
? po/el.mo
? po/en_GB.mo
? po/es.mo
? po/fi.mo
? po/fr.mo
? po/ga.mo
? po/gl.mo
? po/hu.mo
? po/it.mo
? po/ja.mo
? po/ko.mo
? po/lt.mo
? po/nl.mo
? po/no.mo
? po/pl.mo
? po/pt_BR.mo
? po/ro.mo
? po/ru.mo
? po/sk.mo
? po/sl.mo
? po/sv.mo
? po/uk.mo
? po/wa.mo
? po/tr.mo
? po/zh_CN.GB2312.mo
? tests/test-container
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.1081
diff -u -r1.1081 ChangeLog
--- ChangeLog	2001/07/05 15:09:38	1.1081
+++ ChangeLog	2001/07/11 00:23:57
@@ -1,3 +1,10 @@
+2001-07-10  JP Rosevear  <jpr ximian com>
+
+	* bonobo/bonobo-ui-node.c (bonobo_ui_node_from_file): copy the
+	node instead of trying to null out appropriate fields because this
+	we weren't nulling out all the fields and this lead to free memory
+	reads later on when do_strip call xmlUnlinkNode
+
 2001-07-05  Michael Meeks  <michael ximian com>
 
 	* Version 1.0.7
Index: bonobo/bonobo-ui-node.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-ui-node.c,v
retrieving revision 1.14
diff -u -r1.14 bonobo-ui-node.c
--- bonobo/bonobo-ui-node.c	2001/05/24 08:49:06	1.14
+++ bonobo/bonobo-ui-node.c	2001/07/11 00:23:57
@@ -478,9 +478,7 @@
 
 	g_return_val_if_fail (doc != NULL, NULL);
 
-	node = BNODE (doc->xmlRootNode);
-
-	doc->xmlRootNode = NULL;
+	node = BNODE (xmlCopyNode (doc->xmlRootNode, 1));
 	xmlFreeDoc (doc);
 
 	return node;


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