From: Aki Tuomi Date: Fri, 19 Oct 2018 06:39:39 +0000 (+0300) Subject: push-notification-driver-lua: Perform garbage collection after transaction X-Git-Tag: 2.3.9~1156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c73fbdf9dc653bdc802939bc8c15c1f6c5105e08;p=thirdparty%2Fdovecot%2Fcore.git push-notification-driver-lua: Perform garbage collection after transaction Ensure Lua releases resources here. --- diff --git a/src/plugins/push-notification/push-notification-driver-lua.c b/src/plugins/push-notification/push-notification-driver-lua.c index c38c7d928a..6aef5810fe 100644 --- a/src/plugins/push-notification/push-notification-driver-lua.c +++ b/src/plugins/push-notification/push-notification-driver-lua.c @@ -526,7 +526,8 @@ push_notification_driver_lua_end_txn(struct push_notification_driver_txn *dtxn, event_unref(&event); /* release context */ luaL_unref(ctx->script->L, LUA_REGISTRYINDEX, tctx->tx_ref); - + /* call gc here */ + (void)lua_gc(ctx->script->L, LUA_GCCOLLECT, 1); mail_user_unref(&user); }