aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-07-14 18:54:01 +0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-07-15 23:48:45 +0800
commit8ae4bf802aac4218ebfbe10cae09693ba64c05f3 (patch)
tree4e50ee1855cdf96f5b936040dcafded1b312959f /em-format
parent1e6adfccc83fdbf7862fabd883ca1ba8d9a848c2 (diff)
downloadgsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar.gz
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar.bz2
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar.lz
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar.xz
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.tar.zst
gsoc2013-evolution-8ae4bf802aac4218ebfbe10cae09693ba64c05f3.zip
Fix two memory leaks when replying
1: em_utils_reply_to_message() can be passed a newly-created message (from a current selection. It needs to unref it. Which means that when we pass it a message which *isn't* newly-created, we have to obtain a ref of our own. It was that or add a boolean parameter to tell it whether to unref or not. 2: emf_finalize() wasn't unreferencing emf->message -- so when we clone the EMFormat in em_utils_message_to_html() and immediately unreference the clone, a refcount on the message got leaked. Fix emf_finalize() to unref emf->message as presumably it should.
Diffstat (limited to 'em-format')
-rw-r--r--em-format/em-format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/em-format/em-format.c b/em-format/em-format.c
index af49e1062d..c318655cb2 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -100,6 +100,9 @@ emf_finalize (GObject *object)
if (emf->session)
g_object_unref (emf->session);
+ if (emf->message)
+ g_object_unref (emf->message);
+
g_hash_table_destroy (emf->inline_table);
em_format_clear_headers(emf);