From: Timo Sirainen Date: Tue, 9 Jan 2018 20:35:13 +0000 (-0500) Subject: lib-storage: mailbox_delete() - Fix cleanup in error handling X-Git-Tag: 2.3.9~2352 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a8872ce4eb92ca53407b9c95b2cf0ce7043c3bd;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: mailbox_delete() - Fix cleanup in error handling If removing index deletion mark failed, box->deleting wasn't set to FALSE and the mailbox was left opened. --- diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 4cab375e11..b81933647b 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -1646,7 +1646,7 @@ int mailbox_delete(struct mailbox *box) /* deletion failed. revert the mark so it can maybe be tried again later. */ if (mailbox_mark_index_deleted(box, FALSE) < 0) - return -1; + ret = -1; } box->deleting = FALSE;