]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add data stack frame for mailbox_copy and mailbox_move
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 12 Aug 2021 07:02:55 +0000 (10:02 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 20 Sep 2021 13:06:00 +0000 (13:06 +0000)
src/lib-storage/mail-storage.c

index a8a9b39e9fe99df76549da111683f6354f17a13f..1002d8368d8dfd9fc873bf99e998ea6b4f912ed9 100644 (file)
@@ -2796,7 +2796,12 @@ int mailbox_copy(struct mail_save_context **_ctx, struct mail *mail)
        i_assert(!ctx->saving);
        i_assert(!ctx->moving);
 
-       return mailbox_copy_int(_ctx, mail);
+       int ret;
+       T_BEGIN {
+               ret = mailbox_copy_int(_ctx, mail);
+       } T_END;
+
+       return ret;
 }
 
 int mailbox_move(struct mail_save_context **_ctx, struct mail *mail)
@@ -2808,8 +2813,10 @@ int mailbox_move(struct mail_save_context **_ctx, struct mail *mail)
        i_assert(!ctx->moving);
 
        ctx->moving = TRUE;
-       if ((ret = mailbox_copy_int(_ctx, mail)) == 0)
-               mail_expunge(mail);
+       T_BEGIN {
+               if ((ret = mailbox_copy_int(_ctx, mail)) == 0)
+                       mail_expunge(mail);
+       } T_END;
        ctx->moving = FALSE;
        return ret;
 }