[evolution/evolution-3-12] Fix few more memory leaks



commit 162f568fde4c87b4105abb3897dc633791c794b7
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 4 15:37:13 2014 +0200

    Fix few more memory leaks

 e-util/e-file-request.c |    4 +++-
 mail/em-folder-tree.c   |    4 ++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-file-request.c b/e-util/e-file-request.c
index 3f30a6b..b2e4fea 100644
--- a/e-util/e-file-request.c
+++ b/e-util/e-file-request.c
@@ -60,7 +60,7 @@ handle_file_request (GSimpleAsyncResult *res,
 
                stream = g_memory_input_stream_new_from_data (
                                contents, length, (GDestroyNotify) g_free);
-               g_simple_async_result_set_op_res_gpointer (res, stream, NULL);
+               g_simple_async_result_set_op_res_gpointer (res, stream, g_object_unref);
        }
 }
 
@@ -130,6 +130,8 @@ file_request_send_finish (SoupRequest *request,
 
        if (!stream) /* We must always return something */
                stream = g_memory_input_stream_new ();
+       else
+               g_object_ref (stream);
 
        return stream;
 }
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index fef6810..5b5a3b9 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -3205,6 +3205,8 @@ em_folder_tree_select_next_path (EMFolderTree *folder_tree,
                /* TODO : Flags here for better options */
                } while (skip_read_folders && unread <=0 &&
                        gtk_tree_path_compare (current_path, path));
+
+               gtk_tree_path_free (current_path);
        }
 
        if (path) {
@@ -3218,6 +3220,8 @@ em_folder_tree_select_next_path (EMFolderTree *folder_tree,
                        priv->cursor_set = TRUE;
                }
                gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5f, 0.0f);
+
+               gtk_tree_path_free (path);
        }
 
        return;


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