]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-lua: Deinit script after others
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 24 Sep 2018 12:23:59 +0000 (15:23 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 14 Nov 2018 12:01:53 +0000 (14:01 +0200)
Some other plugin might need Lua for deinit

src/plugins/mail-lua/mail-lua-plugin.c

index 26e9fee62bef74370c1842affbefd381e8a3fba2..8ed86881111ed9684db2350e1502232f6beadbd9 100644 (file)
@@ -66,13 +66,14 @@ static void mail_lua_user_deinit(struct mail_user *user)
        if (luser == NULL)
                return;
 
+       luser->module_ctx.super.deinit(user);
+
        if ((ret = mail_lua_call_hook(luser->script, user, MAIL_LUA_USER_DEINIT_FN,
                                      &error)) < 0) {
                e_error(user->event, "mail-lua: %s", error);
        }
 
        dlua_script_unref(&luser->script);
-       luser->module_ctx.super.deinit(user);
 }
 
 static void mail_lua_user_created(struct mail_user *user)