From cb92bb76a6b0b8001393600fc4dbfe65b807e624 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 21 May 2001 22:53:15 +0000 Subject: Store the CamelFolderInfo tree that was returned from 2001-05-21 Jeffrey Stedfast * providers/imap/camel-imap-store.c (get_folder_info_online): Store the CamelFolderInfo tree that was returned from camel_folder_info_build() in a new variable, 'tree', rather than 'fi' since we later use 'fi' when syncing folders. Not only does this fix a memory leak, but it also fixes the bug where the user would only see the last folder in the folder list and/or it's subfolders. svn path=/trunk/; revision=9911 --- camel/providers/imap/camel-imap-store.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'camel/providers/imap') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index bcdfc9f935..5138cda658 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -1053,7 +1053,7 @@ get_folder_info_online (CamelStore *store, const char *top, GPtrArray *folders; const char *name; char *pattern, *status, *p; - CamelFolderInfo *fi; + CamelFolderInfo *fi, *tree; int i; if (!camel_remote_store_connected (CAMEL_REMOTE_STORE (store), ex)) @@ -1133,10 +1133,10 @@ get_folder_info_online (CamelStore *store, const char *top, } /* Assemble. */ - fi = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE); + tree = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE); if (flags & CAMEL_STORE_FOLDER_INFO_FAST) { g_ptr_array_free (folders, TRUE); - return fi; + return tree; } /* Get unread counts. Sync flag changes to the server first so @@ -1185,7 +1185,7 @@ get_folder_info_online (CamelStore *store, const char *top, } g_ptr_array_free (folders, TRUE); - return fi; + return tree; } static gboolean -- cgit v1.2.3