[evolution-patches] Leak fixes



Here are some small leak fixes for gtkhtml and the editor.

--Larry
? test_editor
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.407
diff -u -p -r1.407 ChangeLog
--- ChangeLog	5 Jun 2003 21:32:32 -0000	1.407
+++ ChangeLog	10 Jun 2003 17:53:38 -0000
@@ -1,3 +1,8 @@
+2003-06-10  Larry Ewing  <lewing ximian com>
+
+	* editor-control-factory.c (send_event_str): free the bonobo arg
+	the right way.
+
 2003-06-05  Radek Doulik  <rodo ximian com>
 
 	* GNOME_GtkHTML_Editor.xml.in: changed increase/decrease indent
Index: editor-control-factory.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/editor-control-factory.c,v
retrieving revision 1.130
diff -u -p -r1.130 editor-control-factory.c
--- editor-control-factory.c	20 May 2003 19:58:15 -0000	1.130
+++ editor-control-factory.c	10 Jun 2003 17:53:38 -0000
@@ -674,7 +674,7 @@ send_event_str (GNOME_GtkHTML_Editor_Eng
 	/* printf ("sending to listener\n"); */
 	CORBA_exception_init (&ev);
 	bonobo_retval = GNOME_GtkHTML_Editor_Listener_event (listener, name, bonobo_arg, &ev);
-	CORBA_free (bonobo_arg);
+	bonobo_arg_release (bonobo_arg);
 
 	if (ev._major == CORBA_NO_EXCEPTION) {
 		if (!bonobo_arg_type_is_equal (bonobo_retval->_type, TC_null, &ev)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.1809
diff -u -p -r1.1809 ChangeLog
--- ChangeLog	21 May 2003 16:45:34 -0000	1.1809
+++ ChangeLog	10 Jun 2003 17:50:55 -0000
@@ -1,3 +1,12 @@
+2003-06-10  Larry Ewing  <lewing ximian com>
+
+	* gtkhtml.c (style_set): free the var_name.
+	(selection_get): don't leak the selection string.
+
+2003-06-09  Larry Ewing  <lewing ximian com>
+
+	* htmlengine.c (html_engine_finalize): don't leak body_stack.
+
 2003-05-21  Larry Ewing  <lewing ximian com>
 
 	* libgtkhtml.pc.in (Version): set version correctly.
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.514
diff -u -p -r1.514 gtkhtml.c
--- gtkhtml.c	20 May 2003 18:25:14 -0000	1.514
+++ gtkhtml.c	10 Jun 2003 17:50:58 -0000
@@ -767,6 +767,7 @@ style_set (GtkWidget *widget, GtkStyle  
 		}
 		
 		g_free (fixed_name);
+		g_free (font_var);
 	}
 
 
@@ -1704,8 +1705,10 @@ selection_get (GtkWidget        *widget,
 		if (selection_string)
 			gtk_selection_data_set_text (selection_data, selection_string, strlen (selection_string));
 		
-		g_free (selection_string);
 	}
+
+	g_free (selection_string);
+
 }
 
 /* receive a selection */
Index: htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.542
diff -u -p -r1.542 htmlengine.c
--- htmlengine.c	19 May 2003 19:10:36 -0000	1.542
+++ htmlengine.c	10 Jun 2003 17:51:01 -0000
@@ -3372,6 +3372,11 @@ html_engine_finalize (GObject *object)
 		engine->embeddedStack = NULL;
 	}
 
+	if (engine->body_stack) {
+		html_stack_destroy (engine->body_stack);
+		engine->body_stack = NULL;
+	}
+
 	if (engine->tempStrings) {
 		for (p = engine->tempStrings; p != NULL; p = p->next)
 			g_free (p->data);


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