diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2011-07-28 17:25:38 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-07-28 20:36:58 +0100 |
commit | 75cde2f0f2321e66d35f97cd5fd68f580d7b2014 (patch) | |
tree | 99229890d2bc343de188f6d3fedbba4823d29a58 | |
parent | 411b03ecb13c3528bf9a905bd3dd30d1715809b9 (diff) | |
download | evolution-data-server-75cde2f0f2321e66d35f97cd5fd68f580d7b2014.tar.gz |
Fix stray unref of server in imapx add_folders_to_summary()
This was causing a double (well, multiple) free and use-after-free of the
server; it has no business here.
It was actually seen when a broken Yahoo server gave a namespace with NIL
for the dir_sep, thus causing problems with subfolders.
(cherry picked from commit c3460e79201ba988500014386dbc3f8781dbc5f3)
-rw-r--r-- | camel/providers/imapx/camel-imapx-store.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c index d3b9c8c1c..500e27c3e 100644 --- a/camel/providers/imapx/camel-imapx-store.c +++ b/camel/providers/imapx/camel-imapx-store.c @@ -770,10 +770,8 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA } si = camel_imapx_store_summary_add_from_full (istore->summary, li->name, li->separator); - if (!si) { - g_object_unref (server); + if (!si) continue; - } new_flags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) | (li->flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED); |