aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-08-23 22:21:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-08-23 22:27:06 +0800
commit25d9c75be36e465d6192166a23308aeaf1a7a243 (patch)
tree9970e13fea110970dc0b1ca18552ef0b3545fc9d
parent34547da64387960e32e9afa302dfb703784c0c71 (diff)
downloadgsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar.gz
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar.bz2
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar.lz
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar.xz
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.tar.zst
gsoc2013-evolution-25d9c75be36e465d6192166a23308aeaf1a7a243.zip
Bug 706463 - Refcounting error in e_mail_reader_reply_to_message()
Highlight a section of a mailing list post, click Reply, answer "Reply Privately", Evolution mishandles the source message's reference count, causing the message to finalize too early and crash in Camel.
-rw-r--r--mail/e-mail-reader-utils.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index acd52950c8..a5c877643f 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -1840,18 +1840,11 @@ e_mail_reader_reply_to_message (EMailReader *reader,
if (src_message == NULL) {
src_message = e_mail_part_list_get_message (part_list);
- if (src_message != NULL)
- g_object_ref (src_message);
-
- g_object_unref (part_list);
- part_list = NULL;
-
g_return_if_fail (src_message != NULL);
- } else {
- g_object_unref (part_list);
- part_list = NULL;
}
+ g_clear_object (&part_list);
+
if (!e_web_view_is_selection_active (web_view))
goto whole_message;
@@ -1884,8 +1877,6 @@ e_mail_reader_reply_to_message (EMailReader *reader,
CAMEL_MIME_PART (new_message),
selection, length, "text/html");
- g_object_unref (src_message);
-
composer = em_utils_reply_to_message (
shell, new_message, folder, uid,
reply_type, reply_style, NULL, address);