aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib
diff options
context:
space:
mode:
Diffstat (limited to 'ctl-lib')
-rw-r--r--ctl-lib/ctl-lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c
index ab0abb6..ac22767 100644
--- a/ctl-lib/ctl-lua.c
+++ b/ctl-lib/ctl-lua.c
@@ -692,11 +692,12 @@ int Lua2cWrapper(void* luaHandle, char *funcname, Lua2cFunctionT callback) {
json_object *argsJ = LuaPopArgs(source, luaState, LUA_FIRST_ARG + 1);
int err = (*callback) (source, argsJ, &responseJ);
+ json_object_put(argsJ);
// push error code and eventual response to LUA
int count = 1;
lua_pushinteger(luaState, err);
- if (responseJ)count += LuaPushArgument(source, responseJ);
+ if (responseJ) count += LuaPushArgument(source, responseJ);
return count;
}