Patch to fix [Bug 342102] memory leak in evolution-data-server

Jedy Wang <[email protected]>
Newsgroups gmane.comp.gnome.evolution.patches
Message-ID <1148365612.5696.2.camel@pampas>
Hi,

This is a patch to fix 342102.
Please review it.

Thanks

Jedy Wang

_______________________________________________
Evolution-patches mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/evolution-patches
patch.diff (text/x-patch, 1.4 KB)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.568.2.10
diff -u -r1.568.2.10 ChangeLog
--- ChangeLog	22 Apr 2006 04:51:01 -0000	1.568.2.10
+++ ChangeLog	23 May 2006 06:25:18 -0000
@@ -1,3 +1,12 @@
+2006-05-23  Wang Xin  <[email protected]>
+
+	Fixes #342012
+
+	* libedata-cal/e-cal-backend-sync.c:
+	(_e_cal_backend_modify_object): Free old_object and new_object.
+	(_e_cal_backend_remove_object): Free old_object.
+	
+
 2006-04-22  Harish Krishnaswamy  <[email protected]>
 
 	* backends/groupwise/e-cal-backend-groupwise.c:
Index: libedata-cal/e-cal-backend-sync.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libedata-cal/e-cal-backend-sync.c,v
retrieving revision 1.19
diff -u -r1.19 e-cal-backend-sync.c
--- libedata-cal/e-cal-backend-sync.c	4 Mar 2006 09:57:00 -0000	1.19
+++ libedata-cal/e-cal-backend-sync.c	23 May 2006 06:25:18 -0000
@@ -706,6 +706,9 @@
 		e_data_cal_notify_object_modified (cal, status, old_object, new_object);
 	else
 		e_data_cal_notify_object_modified (cal, status, old_object, calobj);
+
+	g_free (old_object);
+	g_free (new_object);
 }
 
 static void
@@ -734,6 +737,7 @@
 	} else
 		e_data_cal_notify_object_removed (cal, status, NULL, old_object, object);
 
+	g_free (old_object);
 	g_free (object);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.