aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/comp-util.c5
-rw-r--r--calendar/gui/e-calendar-view.c13
-rw-r--r--calendar/gui/e-day-view.c4
-rw-r--r--calendar/gui/e-week-view.c4
5 files changed, 29 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 548bb043bf..c6f28fdebc 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,13 @@
+2008-02-25 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #516498
+ * gui/comp-util.c: (cal_comp_is_on_server):
+ * gui/e-calendar-view.c: (e_calendar_view_cut_clipboard),
+ (delete_event), (e_calendar_view_delete_selected_occurrence):
+ * gui/e-day-view.c: (process_component):
+ * gui/e-week-view.c: (process_component): Free memory returned
+ by e_cal_component_get_recurid_as_string.
+
2008-02-24 Chenthill Palanisamy <pchenthill@novell.com>
Fixes#516408
@@ -22,7 +32,6 @@
(reply_to_calendar_comp), (itip_publish_comp): Free the memory
returned by libical
-
2008-02-20 Milan Crha <mcrha@redhat.com>
** Fix for bug #440426
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 07d06a8f19..e1aacc7c9e 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -207,7 +207,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
gboolean
cal_comp_is_on_server (ECalComponent *comp, ECal *client)
{
- const char *uid, *rid = NULL;
+ const char *uid;
+ char *rid = NULL;
icalcomponent *icalcomp;
GError *error = NULL;
@@ -232,6 +233,7 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client)
if (e_cal_get_object (client, uid, rid, &icalcomp, &error)) {
icalcomponent_free (icalcomp);
+ g_free (rid);
return TRUE;
}
@@ -240,6 +242,7 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client)
g_warning (G_STRLOC ": %s", error->message);
g_clear_error (&error);
+ g_free (rid);
return FALSE;
}
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 0fa16b9ae9..62f929be5e 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -696,7 +696,7 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
e_cal_component_get_uid (comp, &uid);
if (e_cal_component_is_instance (comp)) {
- const char *rid;
+ char *rid = NULL;
icalcomponent *icalcomp;
/* when cutting detached instances, only cut that instance */
@@ -709,6 +709,7 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
} else
e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL,
CALOBJ_MOD_ALL, &error);
+ g_free (rid);
} else
e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
@@ -958,6 +959,7 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
if (delete) {
const char *uid;
+ char *rid = NULL;
if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
@@ -971,15 +973,16 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
g_object_unref (comp);
return;
}
-
+ rid = e_cal_component_get_recurid_as_string (comp);
if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
e_cal_remove_object_with_mod (event->comp_data->client, uid,
- e_cal_component_get_recurid_as_string (comp), CALOBJ_MOD_ALL, &error);
+ rid, CALOBJ_MOD_ALL, &error);
else
e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
+ g_free (rid);
}
g_object_unref (comp);
@@ -1069,7 +1072,8 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
delete = delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view));
if (delete) {
- const char *uid, *rid = NULL;
+ const char *uid;
+ char *rid = NULL;
ECalComponentDateTime dt;
icaltimezone *zone = NULL;
gboolean is_instance = FALSE;
@@ -1128,6 +1132,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
+ g_free (rid);
}
/* free memory */
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index f6a71f31df..93b61a4ce2 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -517,7 +517,8 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
static void
process_component (EDayView *day_view, ECalModelComponent *comp_data)
{
- const char *uid, *rid;
+ const char *uid;
+ char *rid = NULL;
ECalComponent *comp;
AddEventData add_event_data;
@@ -546,6 +547,7 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
e_day_view_add_event (comp, comp_data->instance_start, comp_data->instance_end, &add_event_data);
g_object_unref (comp);
+ g_free (rid);
}
static void
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 07d5b7b8eb..53c2cd63ab 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -303,7 +303,8 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
ECalComponent *comp = NULL;
AddEventData add_event_data;
/* rid is never used in this function? */
- const char *uid, *rid;
+ const char *uid;
+ char *rid = NULL;
/* If we don't have a valid date set yet, just return. */
if (!g_date_valid (&week_view->first_day_shown))
@@ -329,6 +330,7 @@ process_component (EWeekView *week_view, ECalModelComponent *comp_data)
e_week_view_add_event (comp, comp_data->instance_start, comp_data->instance_end, FALSE, &add_event_data);
g_object_unref (comp);
+ g_free (rid);
}
static void