]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: dlua-threads - pop thread table after manipulation
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 22 Mar 2021 14:24:20 +0000 (16:24 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 22 Mar 2021 14:26:28 +0000 (16:26 +0200)
Forgot on a84bfdaf6df8fd6a4cbbf0845c18b09e6ceada36

src/lib-lua/dlua-thread.c

index 875464ca1b00a6c68d796c09ff582ada1531eca2..a0441f8c136b04176fcb333fd950251324fe00f4 100644 (file)
@@ -105,6 +105,9 @@ lua_State *dlua_script_new_thread(struct dlua_script *script)
        /* threads-table[thread] = TLS-table */
        lua_settable(script->L, -3);
 
+       /* pop threads table */
+       lua_pop(script->L, 1);
+
        return thread;
 }
 
@@ -191,6 +194,9 @@ void dlua_script_close_thread(struct dlua_script *script, lua_State **_L)
         */
        lua_settable(*_L, -3);
 
+       /* pop threads table */
+       lua_pop(*_L, 1);
+
        *_L = NULL;
 }