From 3f908a7c0dddf389cba7250b6a977f5229a92d48 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 12 Mar 2013 10:07:01 +0100 Subject: [PATCH] [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); -- 2.7.4