[evolution/gnome-3-38] Fix two memory leaks related to data import
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-38] Fix two memory leaks related to data import
- Date: Fri, 2 Oct 2020 10:27:48 +0000 (UTC)
commit c4bf85ad2c6908fb0cd7b9a7a8886fd06b303e70
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 2 12:27:29 2020 +0200
Fix two memory leaks related to data import
src/e-util/e-import-assistant.c | 4 +++-
src/modules/mail/e-mail-shell-backend.c | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/e-util/e-import-assistant.c b/src/e-util/e-import-assistant.c
index f3f605fc42..b859ea4bf1 100644
--- a/src/e-util/e-import-assistant.c
+++ b/src/e-util/e-import-assistant.c
@@ -151,7 +151,7 @@ filename_changed (GtkWidget *widget,
{
EImportAssistantPrivate *priv;
ImportFilePage *page;
- const gchar *filename;
+ gchar *filename;
gint fileok;
priv = E_IMPORT_ASSISTANT_GET_PRIVATE (assistant);
@@ -219,6 +219,8 @@ filename_changed (GtkWidget *widget,
widget = gtk_assistant_get_nth_page (assistant, PAGE_FILE_CHOOSE);
gtk_assistant_set_page_complete (assistant, widget, fileok);
+
+ g_free (filename);
}
static void
diff --git a/src/modules/mail/e-mail-shell-backend.c b/src/modules/mail/e-mail-shell-backend.c
index 05d823c6db..6403a347e3 100644
--- a/src/modules/mail/e-mail-shell-backend.c
+++ b/src/modules/mail/e-mail-shell-backend.c
@@ -119,8 +119,10 @@ message_parsed_cb (GObject *source_object,
display = g_object_get_data (preview, "mbox-imp-display");
parts_list = e_mail_parser_parse_finish (parser, res, NULL);
- if (!parts_list)
+ if (!parts_list) {
+ g_object_unref (parser);
return;
+ }
folder = e_mail_part_list_get_folder (parts_list);
message_uid = e_mail_part_list_get_message_uid (parts_list);
@@ -144,6 +146,7 @@ message_parsed_cb (GObject *source_object,
e_mail_display_load (display, NULL);
g_object_unref (parts_list);
+ g_object_unref (parser);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]