From 7e99e8afa4a4b1ab7663c999d5bcd6c3603be097 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Thu, 7 Jan 2021 00:44:22 +0300 Subject: [PATCH] Fix. Pop all element from stack in the storage free function --- src/lcutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lcutils.c b/src/lcutils.c index 5b85774..adf895a 100644 --- a/src/lcutils.c +++ b/src/lcutils.c @@ -115,8 +115,8 @@ int lcurl_storage_free(lua_State *L, int storage){ lua_pop(L, 1); } } - lua_pop(L, 1); luaL_unref(L, LCURL_LUA_REGISTRY, storage); + lua_pop(L, 2); return LUA_NOREF; }