From 05438a2dad5111faa4e3e6551f4cc8d9be56b092 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 8 Feb 2008 09:49:51 +0000 Subject: ** Part of fixes for bug #395939 2008-02-08 Milan Crha ** Part of fixes for bug #395939 * gui/alarm-notify/alarm-queue.c: (update_cqa): * conduits/calendar/calendar-conduit.c: (local_record_from_comp): Free alarm properly. svn path=/trunk/; revision=34976 --- calendar/gui/alarm-notify/alarm-queue.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'calendar/gui/alarm-notify') diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index e77377bdd8..b10b6f55bf 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -2179,11 +2179,16 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp) for (qa_list = cqa->queued_alarms; qa_list; qa_list = qa_list->next) { QueuedAlarm *qa = qa_list->data; char *check_auid = (char *) qa->instance->auid; + ECalComponentAlarm *alarm; - if (e_cal_component_get_alarm (newcomp, check_auid)) + alarm = e_cal_component_get_alarm (newcomp, check_auid); + if (alarm) { + e_cal_component_alarm_free (alarm); continue; - else { - if (e_cal_component_get_alarm (oldcomp, check_auid)) { /* Need to update QueuedAlarms */ + } else { + alarm = e_cal_component_get_alarm (oldcomp, check_auid); + if (alarm) { /* Need to update QueuedAlarms */ + e_cal_component_alarm_free (alarm); if (alarms == NULL) { d(printf("%s:%d (update_cqa) - No alarms found in the modified component\n",__FILE__, __LINE__)); break; -- cgit v1.2.3