fix potential double free

the store may be discarded before we reach maildir_select() again, which
will leave us with a dangling pointer.
This commit is contained in:
Oswald Buddenhagen 2011-05-22 17:23:23 +02:00
parent e71ad53b7f
commit 04ca97920d

View File

@ -763,6 +763,7 @@ maildir_select( store_t *gctx, int create,
maildir_cleanup( gctx ); maildir_cleanup( gctx );
gctx->msgs = 0; gctx->msgs = 0;
ctx->excs = 0;
ctx->uvfd = -1; ctx->uvfd = -1;
#ifdef USE_DB #ifdef USE_DB
ctx->db = 0; ctx->db = 0;