These have been on my todo list for a while. The first fixes a potential footgun with idata->hcache handling. In certain cases, Mutt can nest IMAP handling that (re)opens idata->hcache. The nested caller can thus close the idata->hcache, creating a bug in the top level handler if they aren't careful.
The second changes the signature type of imap_close_hcache() to pass a pointer to a pointer, so that FREE'ing the hcache NULL's out the value in the caller too. (I probably should have done this cleanup before the first one, but it's not a big enough deal to redo the order.) Kevin J. McCarthy (2): Allow IMAP idata->hcache nested opening. Change mutt_hcache_close() to NULL the passed parameter. hcache.c | 62 ++++++++++++++++++++++++++++++--------------- hcache.h | 2 +- imap/imap.c | 50 ++++++++---------------------------- imap/imap_private.h | 4 ++- imap/message.c | 8 +++--- imap/util.c | 15 ++++++++--- mh.c | 10 ++++---- pop.c | 6 ++--- 8 files changed, 78 insertions(+), 79 deletions(-) -- 2.55.0
