diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2008-02-25 19:00:13 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2008-02-25 19:00:13 +0800 |
commit | f3c82ae09d287c2e581977da74d4927af5aab755 (patch) | |
tree | f39241fde810c78b3694d48b9cbf61572218b330 /calendar/gui/e-calendar-view.c | |
parent | 79a8efeece20b718bb0f276fcb5d6a59ac15bd01 (diff) | |
download | gsoc2013-evolution-f3c82ae09d287c2e581977da74d4927af5aab755.tar.gz gsoc2013-evolution-f3c82ae09d287c2e581977da74d4927af5aab755.tar.zst gsoc2013-evolution-f3c82ae09d287c2e581977da74d4927af5aab755.zip |
Fixes #516498
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.
svn path=/trunk/; revision=35086
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 13 |
1 files changed, 9 insertions, 4 deletions
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 */ |