summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2011-07-28 17:25:38 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-07-28 22:11:18 +0100
commitdc8d554b4047efb0cc5dee5759be8fac0ef294fa (patch)
treee073b9987f6d6ce26d4fc90258e5f03efb24ab1c
parent8e31695c92604e2f894854df9d71878ec3b0857c (diff)
downloadevolution-data-server-meego-eds.tar.gz
Fix stray unref of server in imapx add_folders_to_summary()meego-eds
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.c4
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 782a808e0..7b3542926 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -1047,10 +1047,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);