From 23aba87f9bbeb4fe8c54e499cce4059078bb3598 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Mon, 13 Aug 2001 22:31:20 +0000 Subject: Fix a leak. 2001-08-13 Peter Williams * providers/imap/camel-imap-store.c (delete_folder): Fix a leak. * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah, handle when namespace = NULL (can happen upon initial open of mailbox.) * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Don't crash when %F'ing with an empty folder name and NULL namespace. svn path=/trunk/; revision=11971 --- camel/providers/imap/camel-imap-store.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'camel/providers/imap/camel-imap-store.c') diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index b4c01110ea..eb0c61e0f8 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -961,6 +961,10 @@ delete_folder (CamelStore *store, const char *folder_name, CamelException *ex) response = camel_imap_command (imap_store, NULL, ex, "SELECT INBOX"); if (response) { camel_imap_response_free (imap_store, response); + + if (imap_store->current_folder) + camel_object_unref (CAMEL_OBJECT (imap_store->current_folder)); + /* no need to actually create a CamelFolder for INBOX */ imap_store->current_folder = NULL; } else return; -- cgit v1.2.3