]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_delete() - Fix cleanup in error handling
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 9 Jan 2018 20:35:13 +0000 (15:35 -0500)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 9 Feb 2018 14:09:41 +0000 (16:09 +0200)
If removing index deletion mark failed, box->deleting wasn't set to FALSE
and the mailbox was left opened.

src/lib-storage/mail-storage.c

index 6f441c21104fb825a112f5a8e02243bf2433c32b..871cb02f630335c80ec7825fa3c5fd00a74e322c 100644 (file)
@@ -1577,7 +1577,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;