From: Aki Tuomi Date: Mon, 24 Sep 2018 12:23:59 +0000 (+0300) Subject: mail-lua: Deinit script after others X-Git-Tag: 2.3.4~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f208ab22e35ebe9196ef242c2869ee5d49c635e8;p=thirdparty%2Fdovecot%2Fcore.git mail-lua: Deinit script after others Some other plugin might need Lua for deinit --- diff --git a/src/plugins/mail-lua/mail-lua-plugin.c b/src/plugins/mail-lua/mail-lua-plugin.c index 26e9fee62b..8ed8688111 100644 --- a/src/plugins/mail-lua/mail-lua-plugin.c +++ b/src/plugins/mail-lua/mail-lua-plugin.c @@ -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)