]> granicus.if.org Git - mutt/commitdiff
Brendan's version of the last fix. I put it in since he's most
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 8 Sep 2000 21:52:04 +0000 (21:52 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 8 Sep 2000 21:52:04 +0000 (21:52 +0000)
likely the next one to look at or change this. ,-)

imap/imap.c

index 0562019ea4846e1aec9e27c4b1d83b565536fee4..0ccf4b10f6d90560e37cfed2800aa2ed00f4c7b2 100644 (file)
@@ -471,7 +471,7 @@ int imap_open_mailbox (CONTEXT* ctx)
 
   /* we require a connection which isn't currently in IMAP_SELECTED state */
   if (!(idata = imap_conn_find (&(mx.account), M_IMAP_CONN_NOSELECT)))
-    goto fail;
+    goto fail_noidata;
   conn = idata->conn;
 
   /* once again the context is new */
@@ -622,9 +622,8 @@ int imap_open_mailbox (CONTEXT* ctx)
   return 0;
 
  fail:
-  if(idata)
-    idata->state = IMAP_AUTHENTICATED;
-
+  idata->state = IMAP_AUTHENTICATED;
+ fail_noidata:
   FREE (&mx.mbox);
   return -1;
 }