aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-10-02 02:24:31 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-10-02 02:24:31 +0800
commit68a1ba71154f3e443a2efa309a70409df1927f13 (patch)
tree04192fc9c5d28cf5f55cbf6513973eb69d527296 /calendar/pcs
parentda449e4daccb7d800398d5b350d50bea87df2c4c (diff)
downloadgsoc2013-evolution-68a1ba71154f3e443a2efa309a70409df1927f13.tar.gz
gsoc2013-evolution-68a1ba71154f3e443a2efa309a70409df1927f13.tar.zst
gsoc2013-evolution-68a1ba71154f3e443a2efa309a70409df1927f13.zip
strdup the uid to avoid double free, write out only after everything is
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 svn path=/trunk/; revision=13266
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/cal-backend-file.c6
1 files changed, 3 insertions, 3 deletions
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);