From 83b0617ee9984cdfd27622acaa36e071a5e188dc Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Mon, 30 Jan 2017 08:54:50 +0300 Subject: [PATCH] Deallocate TLS context when closing the Lua state. --- src/sb_lua.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sb_lua.c b/src/sb_lua.c index 644ae2e..b95fabb 100644 --- a/src/sb_lua.c +++ b/src/sb_lua.c @@ -779,6 +779,8 @@ int sb_lua_close_state(lua_State *state) db_driver = NULL; } + xfree(tls_lua_ctxt); + return 0; }