[evolution/wip/webkit2] Fix possible memory leak with attachments in message preview
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Fix possible memory leak with attachments in message preview
- Date: Wed, 2 Mar 2016 17:00:24 +0000 (UTC)
commit cd85a3421065fb0b3c3254db7e0a1f47fe6a7afc
Author: Milan Crha <mcrha redhat com>
Date: Wed Nov 18 19:53:20 2015 +0100
Fix possible memory leak with attachments in message preview
em-format/e-mail-formatter-attachment.c | 2 +-
em-format/e-mail-part-attachment-bar.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/em-format/e-mail-formatter-attachment.c b/em-format/e-mail-formatter-attachment.c
index f23c37d..2a2f2c9 100644
--- a/em-format/e-mail-formatter-attachment.c
+++ b/em-format/e-mail-formatter-attachment.c
@@ -168,7 +168,7 @@ emfe_attachment_format (EMailFormatterExtension *extension,
e_attachment_store_add_attachment (
store, attachment);
}
- g_list_free (attachments);
+ g_list_free_full (attachments, g_object_unref);
} else {
g_warning ("Failed to locate attachment-bar for %s", part_id);
}
diff --git a/em-format/e-mail-part-attachment-bar.c b/em-format/e-mail-part-attachment-bar.c
index 6a0a07c..dc599f0 100644
--- a/em-format/e-mail-part-attachment-bar.c
+++ b/em-format/e-mail-part-attachment-bar.c
@@ -37,6 +37,9 @@ mail_part_attachment_bar_dispose (GObject *object)
priv = E_MAIL_PART_ATTACHMENT_BAR_GET_PRIVATE (object);
+ if (priv->store)
+ e_attachment_store_remove_all (priv->store);
+
g_clear_object (&priv->store);
/* Chain up to parent's dispose() method. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]