changeset: 7060:407100d15766
user:      Kevin McCarthy <ke...@8t8.us>
date:      Mon May 22 18:30:38 2017 -0700
link:      http://dev.mutt.org/hg/mutt/rev/407100d15766

Don't clean up msn idata when closing an open-append mailbox. (see #3942)

This is a continuation of commit 59a2125b49f2 with changes made in the
default branch.

Thanks again to Will Yardley for helping test the imap read-headers
changes and discovering this bug.

diffs (22 lines):

diff -r aec6b48e8ea5 -r 407100d15766 imap/imap.c
--- a/imap/imap.c       Mon May 22 18:25:08 2017 -0700
+++ b/imap/imap.c       Mon May 22 18:30:38 2017 -0700
@@ -1409,6 +1409,9 @@
     idata->ctx = NULL;
 
     hash_destroy (&idata->uid_hash, NULL);
+    FREE (&idata->msn_index);
+    idata->msn_index_size = 0;
+    idata->max_msn = 0;
 
     for (i = 0; i < IMAP_CACHE_LEN; i++)
     {
@@ -1427,8 +1430,6 @@
     /* mailbox may not have fully loaded */
     if (ctx->hdrs[i] && ctx->hdrs[i]->data)
       imap_free_header_data ((IMAP_HEADER_DATA**)&(ctx->hdrs[i]->data));
-  FREE (&idata->msn_index);
-  idata->msn_index_size = 0;
 
   return 0;
 }

Reply via email to