]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
push-notification-driver-lua: Perform garbage collection after transaction
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 19 Oct 2018 06:39:39 +0000 (09:39 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 14 Nov 2018 12:14:02 +0000 (14:14 +0200)
Ensure Lua releases resources here.

src/plugins/push-notification/push-notification-driver-lua.c

index c38c7d928a215c75f46dfe31145ea5f05e1af4f1..6aef5810febf1b96ba20b53c56805bca3de8b349 100644 (file)
@@ -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);
 }