aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/pcs/cal-backend-file.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 1888c9ed6c..461d8b5388 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-01 JP Rosevear <jpr@ximian.com>
+
+ * pcs/cal-backend-file.c (cal_backend_file_compute_changes):
+ strdup the uid to avoid double free, write out only after
+ everything is done
+
2001-10-01 Rodrigo Moya <rodrigo@ximian.com>
* gui/gnome-cal.c (gnome_calendar_open): don't use
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 0cc7c89f3e..3f0c73dc99 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1436,14 +1436,14 @@ cal_backend_file_compute_changes (CalBackend *backend, CalObjType type, const ch
coc->calobj = CORBA_string_dup (calobj);
coc->type = GNOME_Evolution_Calendar_ADDED;
changes = g_list_prepend (changes, coc);
- change_ids = g_list_prepend (change_ids, uid);
+ change_ids = g_list_prepend (change_ids, g_strdup (uid));
break;
case E_DBHASH_STATUS_DIFFERENT:
coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
coc->calobj = CORBA_string_dup (calobj);
coc->type = GNOME_Evolution_Calendar_MODIFIED;
changes = g_list_prepend (changes, coc);
- change_ids = g_list_prepend (change_ids, uid);
+ change_ids = g_list_prepend (change_ids, g_strdup (uid));
break;
}
}
@@ -1482,11 +1482,11 @@ cal_backend_file_compute_changes (CalBackend *backend, CalObjType type, const ch
} else {
e_dbhash_remove (ehash, uid);
}
- e_dbhash_write (ehash);
CORBA_free (coc);
g_free (uid);
}
+ e_dbhash_write (ehash);
e_dbhash_destroy (ehash);
cal_obj_uid_list_free (uids);