aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-02-08 17:49:51 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-02-08 17:49:51 +0800
commit05438a2dad5111faa4e3e6551f4cc8d9be56b092 (patch)
treef169a6ddf8be8fd970d00fa538e5b95b6c9f1889 /calendar
parent980c6ee5677d24d2e9a0c848854347cb14af77e1 (diff)
downloadgsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar.gz
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar.bz2
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar.lz
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar.xz
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.tar.zst
gsoc2013-evolution-05438a2dad5111faa4e3e6551f4cc8d9be56b092.zip
** Part of fixes for bug #395939
2008-02-08 Milan Crha <mcrha@redhat.com> ** 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
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c2
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c11
3 files changed, 17 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index be12dadc1f..7b94fe8694 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-08 Milan Crha <mcrha@redhat.com>
+
+ ** 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.
+
2008-01-28 Milan Crha <mcrha@redhat.com>
** Fix for bug #240073
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 2654477e0f..9cc9227289 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -1104,6 +1104,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
for (l = uids; l != NULL; l = l->next) {
alarm = e_cal_component_get_alarm (comp, l->data);
e_cal_component_alarm_get_trigger (alarm, &trigger);
+ e_cal_component_alarm_free (alarm);
if ((trigger.type == E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START
&& trigger.u.rel_duration.is_neg)) {
@@ -1136,7 +1137,6 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
local->appt->alarm = 1;
break;
}
- e_cal_component_alarm_free (alarm);
}
cal_obj_uid_list_free (uids);
}
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;