]> granicus.if.org Git - neomutt/commitdiff
Null out idata->hcache when closing, and remove close from open failure (mx_close...
authorBrendan Cully <brendan@kublai.com>
Mon, 9 Apr 2007 16:09:59 +0000 (09:09 -0700)
committerBrendan Cully <brendan@kublai.com>
Mon, 9 Apr 2007 16:09:59 +0000 (09:09 -0700)
imap/imap.c

index 406221f3090cc7edd9d6dfee473a44c3f9299d5f..c68f361ebfbfb2a3ccc9b7c5fb33d2c752b808f0 100644 (file)
@@ -757,9 +757,6 @@ int imap_open_mailbox (CONTEXT* ctx)
   return 0;
 
  fail:
-#ifdef USE_HCACHE
-  mutt_hcache_close (idata->hcache);
-#endif
   if (idata->state == IMAP_SELECTED)
     idata->state = IMAP_AUTHENTICATED;
  fail_noidata:
@@ -1324,6 +1321,7 @@ int imap_close_mailbox (CONTEXT* ctx)
 
 #ifdef USE_HCACHE
   mutt_hcache_close (idata->hcache);
+  idata->hcache = NULL;
 #endif
   mutt_bcache_close (&idata->bcache);