[evolution/wip/webkit2] Bug 760971 - [Calendar] Double-free when editing meeting attendees
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 760971 - [Calendar] Double-free when editing meeting attendees
- Date: Thu, 3 Mar 2016 13:45:04 +0000 (UTC)
commit 3d2d4831a31678f1b45fee3c1c464806ac7b749f
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 25 19:53:37 2016 +0100
Bug 760971 - [Calendar] Double-free when editing meeting attendees
calendar/gui/e-comp-editor.c | 2 +-
calendar/gui/e-meeting-list-view.c | 29 ++---------------------------
calendar/gui/itip-utils.c | 16 ++++++++++++----
3 files changed, 15 insertions(+), 32 deletions(-)
---
diff --git a/calendar/gui/e-comp-editor.c b/calendar/gui/e-comp-editor.c
index 12688c6..6650308 100644
--- a/calendar/gui/e-comp-editor.c
+++ b/calendar/gui/e-comp-editor.c
@@ -378,7 +378,7 @@ ece_send_process_method (SaveData *sd,
GSList *attach_list = NULL;
GSList *attach;
- /* mime_attach_list is freed by itip_send_comp_sync */
+ /* mime_attach_list is freed by itip_send_component() */
mime_attach_list = sd->mime_attach_list;
sd->mime_attach_list = NULL;
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 0766adb..da16b53 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -305,21 +305,7 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view,
const gchar *attendee = NULL;
EDestination *des = l->data;
- if (e_destination_is_evolution_list (des)) {
- GList *l2, *dl;
-
- dl = (GList *) e_destination_list_get_dests (des);
-
- for (l2 = dl; l2; l2 = l2->next) {
- attendee = e_destination_get_email (l2->data);
- if (madd && attendee && g_str_equal (madd, attendee)) {
- g_object_unref (l2->data);
- /* coverity[returned_pointer] */
- l2 = g_list_remove (l2, l2->data);
- break;
- }
- }
- } else {
+ if (!e_destination_is_evolution_list (des)) {
attendee = e_destination_get_email (des);
if (madd && attendee && g_str_equal (madd, attendee)) {
e_destination_store_remove_destination (destination_store, des);
@@ -357,18 +343,7 @@ e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *v
for (l = destinations; l; l = g_list_next (l)) {
EDestination *des = l->data;
- if (e_destination_is_evolution_list (des)) {
- GList *m, *dl;
-
- dl = (GList *) e_destination_list_get_dests (des);
-
- for (m = dl; m; m = m->next) {
- g_object_unref (m->data);
- m = g_list_remove (m, l->data);
- }
- } else {
- e_destination_store_remove_destination (destination_store, des);
- }
+ e_destination_store_remove_destination (destination_store, des);
}
g_list_free (destinations);
}
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index b958978..f3d639f 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -2052,13 +2052,21 @@ itip_send_component (ESourceRegistry *registry,
ItipSendComponentData *isc;
isc = g_new0 (ItipSendComponentData, 1);
- isc->registry = registry;
+ isc->registry = g_object_ref (registry);
isc->method = method;
isc->send_comp = g_object_ref (send_comp);
- isc->cal_client = cal_client;
- isc->zones = zones;
+ isc->cal_client = g_object_ref (cal_client);
+ if (zones)
+ isc->zones = icalcomponent_new_clone (zones);
isc->attachments_list = attachments_list;
- isc->users = users;
+ if (users) {
+ GSList *link;
+
+ isc->users = g_slist_copy (users);
+ for (link = isc->users; link; link = g_slist_next (link)) {
+ link->data = g_strdup (link->data);
+ }
+ }
isc->strip_alarms = strip_alarms;
isc->only_new_attendees = only_new_attendees;
isc->ensure_master_object = ensure_master_object;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]