[evolution/gnome-3-22] Fix few more memory leaks



commit 90ab2afd5f4f8453f1b63ed799a2f40e9c499911
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jan 10 19:24:40 2017 +0100

    Fix few more memory leaks

 mail/e-cid-request.c                        |    3 +++
 mail/em-folder-utils.c                      |    2 +-
 modules/mail/e-mail-shell-backend.c         |    2 ++
 modules/webkit-editor/e-webkit-editor.c     |    2 ++
 plugins/publish-calendar/publish-calendar.c |    2 ++
 5 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/mail/e-cid-request.c b/mail/e-cid-request.c
index e7529f7..b89c591 100644
--- a/mail/e-cid-request.c
+++ b/mail/e-cid-request.c
@@ -112,8 +112,11 @@ e_cid_request_process_sync (EContentRequest *request,
                }
 
                g_bytes_unref (bytes);
+       } else {
+               g_byte_array_free (byte_array, TRUE);
        }
 
+       g_object_unref (output_stream);
        g_object_unref (mime_part);
        g_object_unref (part);
 
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 479d878..7a1dc09 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -125,7 +125,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
        while (pending) {
                CamelFolderInfo *info = pending->data;
 
-               pending = g_list_remove_link (pending, pending);
+               pending = g_list_delete_link (pending, pending);
                while (info) {
                        CamelFolder *fromfolder, *tofolder;
                        GPtrArray *uids;
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 506b0d7..00eafec 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -739,6 +739,8 @@ mail_shell_backend_create_network_page (EPreferencesWindow *window)
        gtk_widget_show (widget);
        gtk_box_pack_start (vbox, widget, FALSE, FALSE, 0);
 
+       pango_attr_list_unref (bold);
+
        hbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4));
        #if GTK_CHECK_VERSION(3,12,0)
        gtk_widget_set_margin_start (GTK_WIDGET (hbox), 12);
diff --git a/modules/webkit-editor/e-webkit-editor.c b/modules/webkit-editor/e-webkit-editor.c
index 410be6a..e1f5224 100644
--- a/modules/webkit-editor/e-webkit-editor.c
+++ b/modules/webkit-editor/e-webkit-editor.c
@@ -2117,6 +2117,8 @@ webkit_editor_insert_image_from_mime_part (EContentEditor *editor,
 
        g_free (base64_encoded);
        g_free (mime_type);
+       g_free (cid_uri);
+       g_free (src);
        g_object_unref (stream);
 }
 
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index dfa4e17..c843644 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -909,6 +909,8 @@ publish_calendar_locations (EPlugin *epl,
 
        g_object_unref (builder);
 
+       g_object_set_data_full (G_OBJECT (toplevel), "publish-calendar-ui-data", ui, g_free);
+
        return toplevel;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]