[evolution-data-server] [IMAPX] Fix a memory leak around imapx_untagged_vanished()



commit 3f908a7c0dddf389cba7250b6a977f5229a92d48
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 12 10:07:01 2013 +0100

    [IMAPX] Fix a memory leak around imapx_untagged_vanished()

 camel/camel-imapx-server.c |    2 +-
 camel/camel-imapx-utils.c  |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 0bcef82..095ee9a 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -1636,7 +1636,7 @@ imapx_untagged_vanished (CamelIMAPXServer *is,
        uid_list = g_list_reverse (uid_list);
        camel_folder_summary_remove_uids (folder->summary, uid_list);
        is->expunged = g_list_concat (is->expunged, uid_list);
-       g_ptr_array_free (uids, FALSE);
+       g_ptr_array_free (uids, TRUE);
 
        g_object_unref (folder);
 
diff --git a/camel/camel-imapx-utils.c b/camel/camel-imapx-utils.c
index d851e5f..1431ab6 100644
--- a/camel/camel-imapx-utils.c
+++ b/camel/camel-imapx-utils.c
@@ -1712,7 +1712,7 @@ imapx_parse_uids (CamelIMAPXStream *is,
                   GCancellable *cancellable,
                   GError **error)
 {
-       GPtrArray *uids = g_ptr_array_new ();
+       GPtrArray *uids;
        guchar *token;
        gchar **splits;
        guint len, str_len;
@@ -1722,6 +1722,7 @@ imapx_parse_uids (CamelIMAPXStream *is,
        if (tok < 0)
                return NULL;
 
+       uids = g_ptr_array_new ();
        splits = g_strsplit ((gchar *) token, ",", -1);
        str_len = g_strv_length (splits);
 


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