]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_user_unref() - Add data stack frame
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 21 Sep 2021 14:51:15 +0000 (17:51 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 22 Sep 2021 11:11:23 +0000 (11:11 +0000)
The deinit code paths can sometimes eat up quite a lot of data stack.

src/lib-storage/mail-user.c

index 2e36b0274434f7f143ca47e61dddbc9a9c686f2e..4c02a74a4872e02b05d96587278b30217265f9ab 100644 (file)
@@ -218,8 +218,10 @@ void mail_user_unref(struct mail_user **_user)
 
        /* call deinit() and deinit_pre() with refcount=1, otherwise we may
           assert-crash in mail_user_ref() that is called by some handlers. */
-       user->v.deinit_pre(user);
-       user->v.deinit(user);
+       T_BEGIN {
+               user->v.deinit_pre(user);
+               user->v.deinit(user);
+       } T_END;
        event_unref(&user->event);
        i_assert(user->refcount == 1);
        pool_unref(&user->pool);