]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 8 Feb 2018 10:08:43 +0000 (12:08 +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 4cab375e11270bce3d42806942b0776f41d0e827..b81933647b3b2c7084cb86cc4af5747cb8e442e5 100644 (file)
@@ -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;