[evolution] Fix few memory leaks around mail print
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Fix few memory leaks around mail print
- Date: Tue, 26 Feb 2019 14:31:31 +0000 (UTC)
commit df483c7124b675c908d9384440a6f9ec9d41e3f6
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 26 15:31:47 2019 +0100
Fix few memory leaks around mail print
src/mail/e-mail-printer.c | 2 ++
src/mail/e-mail-reader-utils.c | 1 +
2 files changed, 3 insertions(+)
---
diff --git a/src/mail/e-mail-printer.c b/src/mail/e-mail-printer.c
index 73b676c833..880f4fbf6e 100644
--- a/src/mail/e-mail-printer.c
+++ b/src/mail/e-mail-printer.c
@@ -283,6 +283,7 @@ mail_printer_print_timeout_cb (GTask *task)
if (response == WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL) {
async_context->print_result = GTK_PRINT_OPERATION_RESULT_CANCEL;
g_task_return_boolean (task, TRUE);
+ g_object_unref (task);
}
return G_SOURCE_REMOVE;
@@ -313,6 +314,7 @@ mail_printer_load_changed_cb (WebKitWebView *web_view,
/* Check if we've been cancelled. */
if (g_task_return_error_if_cancelled (task)) {
+ g_object_unref (task);
return;
} else {
GSource *timeout_source;
diff --git a/src/mail/e-mail-reader-utils.c b/src/mail/e-mail-reader-utils.c
index 5a69731ad2..2db5f04bc4 100644
--- a/src/mail/e-mail-reader-utils.c
+++ b/src/mail/e-mail-reader-utils.c
@@ -1597,6 +1597,7 @@ mail_reader_print_parse_message_cb (GObject *source_object,
e_mail_printer_set_mode (printer, E_MAIL_FORMATTER_MODE_SOURCE);
g_clear_object (&remote_content);
+ g_clear_object (&part_list);
e_activity_set_text (activity, _("Printing"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]