[evolution-patches] bonobo-ui mis-use in evolution/widgets




bonobo_ui_node_to_string was changed at some point (december/2001(!)) to specify g_free for freeing the result.

causes a crash if you're using a different malloc implementation between libxml and glib.

? widgets/misc/test-source-option-menu
? widgets/misc/test-source-selector
? widgets/misc/test-title-bar
Index: widgets/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/ChangeLog,v
retrieving revision 1.130
diff -u -p -r1.130 ChangeLog
--- widgets/ChangeLog	11 Mar 2005 12:02:48 -0000	1.130
+++ widgets/ChangeLog	14 Mar 2005 08:23:18 -0000
@@ -1,3 +1,9 @@
+2005-03-14  Not Zed  <NotZed Ximian com>
+
+	* menus/gal-view-menus.c (build_menus): don't
+	bonobo_ui_free_string from bonobo_ui_node_to_string - it should be
+	g_free'd now (api chagne in bonobo).
+
 2005-03-11  Sushma Rai  <rsushma novell com>
 
 	* misc/e-send-options.c (setup_widgets): Not showing the send options
Index: widgets/menus/gal-view-menus.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/menus/gal-view-menus.c,v
retrieving revision 1.44
diff -u -p -r1.44 gal-view-menus.c
--- widgets/menus/gal-view-menus.c	12 Nov 2004 13:52:17 -0000	1.44
+++ widgets/menus/gal-view-menus.c	14 Mar 2005 08:23:18 -0000
@@ -269,7 +269,6 @@ build_menus(GalViewMenus *menus)
 {
 	BonoboUINode *root, *menu, *submenu, *place, *menuitem, *commands, *command;
 	char *xml;
-	xmlChar *string;
 	int length;
 	int i;
 	GalViewInstance *instance = menus->priv->instance;
@@ -377,9 +376,7 @@ build_menus(GalViewMenus *menus)
 		bonobo_ui_node_set_attr(command, "name", "DefineViews");
 	}
 
-	string = bonobo_ui_node_to_string(root, TRUE);
-	xml = g_strdup(string);
-	bonobo_ui_node_free_string(string);
+	xml = bonobo_ui_node_to_string(root, TRUE);
 
 	bonobo_ui_node_free(root);
 


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