aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSamarjit Adhikari <samarjit.adhikari@gmail.com>2013-05-12 20:27:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-12 20:27:36 +0800
commitf0151c785648b44850b46fa50336126c282fcc58 (patch)
treed4e8bf3e3ff5e564bd00d0ef20c29a08a2af5e16 /plugins
parent35f0a8499360e6a9a62a17308b0c4847074d90ab (diff)
downloadgsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar.gz
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar.bz2
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar.lz
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar.xz
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.tar.zst
gsoc2013-evolution-f0151c785648b44850b46fa50336126c282fcc58.zip
Bug 697632 - [mail-to-task] Invalid unref of a CamelFolder
e_mail_reader_get_folder() does not return a new CamelFolder reference, yet mail_to_event() was acting as though it does. This caused a crash after the function ran and Evolution tried to use the folder again. Truth be told, e_mail_reader_get_folder() really *should* return a new reference to ensure the CamelFolder is not finalized while it's in use. But we would need to rename the function to e_mail_reader_ref_folder() to reflect the change in semantics, and I suspect the function is used in a great many places.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mail-to-task/mail-to-task.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 34473bcd03..0293701a0e 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -1130,7 +1130,6 @@ mail_to_event (ECalClientSourceType source_type,
if (response == GTK_RESPONSE_NO) {
em_utils_uids_free (uids);
- g_object_unref (folder);
return;
}
}
@@ -1199,7 +1198,6 @@ mail_to_event (ECalClientSourceType source_type,
e_notice (NULL, GTK_MESSAGE_ERROR, _("No writable calendar is available."));
em_utils_uids_free (uids);
- g_object_unref (folder);
if (error)
g_error_free (error);
goto exit;
@@ -1215,7 +1213,7 @@ mail_to_event (ECalClientSourceType source_type,
data = g_new0 (AsyncData, 1);
data->source = g_object_ref (source);
data->source_type = source_type;
- data->folder = folder;
+ data->folder = g_object_ref (folder);
data->uids = uids;
data->with_attendees = with_attendees;