[evolution-patches] Fix memory leaks in evolution calendar conduits
- From: "Mark G. Adams" <mark g adams sympatico ca>
- To: "evolution-patches lists ximian com" <evolution-patches lists ximian com>
- Subject: [evolution-patches] Fix memory leaks in evolution calendar conduits
- Date: Mon, 27 Jun 2005 11:20:59 -0400
Greetings all.
While working on fixing http://bugzilla.gnome.org/show_bug.cgi?id=274032
(PDA sync broken on FC4), I found a couple of memory leaks in the
Evolution conduits, in particular leaking generated UIDs.
The attached patch fixes those leaks, as well as providing a changelog
entry. They are also attached to
http://bugzilla.gnome.org/show_bug.cgi?id=309138 where I originally
reported this.
In both the calendar (as part of process_multi_day) and todo (as part of
add_record) conduits, we generate a new uid but never free it.
//Mark
--- calendar/conduits/todo/todo-conduit.c~ 2004-08-25 22:12:07.000000000 -0400
+++ calendar/conduits/todo/todo-conduit.c 2005-06-27 11:07:03.000000000 -0400
@@ -1191,6 +1191,7 @@
e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
g_object_unref (comp);
+ g_free (uid);
return retval;
}
--- calendar/conduits/calendar/calendar-conduit.c~ 2005-01-10 19:06:49.000000000 -0500
+++ calendar/conduits/calendar/calendar-conduit.c 2005-06-27 11:07:55.000000000 -0400
@@ -646,6 +646,8 @@
event_start = day_end;
day_end = time_day_end_with_zone (event_start, ctxt->timezone);
+
+ g_free (new_uid);
}
dt_start.value = old_start_value;
dt_end.value = old_end_value;
--- ChangeLog~ 2005-04-08 15:25:11.000000000 -0400
+++ ChangeLog 2005-06-27 11:11:25.000000000 -0400
@@ -1,3 +1,8 @@
+2005-06-27 Mark G. Adams <mark g adams sympatico ca>
+
+ * calendar/conduits/todo/todo-conduit.c: Fix leak of uids
+ * calendar/conduits/calendar/calendar-conduit.c: Fix leak of uids
+
2005-04-08 JP Rosevear <jpr novell com>
* configure.in: bump version, requires
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]