From e78269bae9dee5f483ce5d47115e8bae267fadc3 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 4 Dec 2017 17:30:02 +0100 Subject: Avoid compile warning, memory leaks, linting Change-Id: Ida18aeab20d5b894609c1a9c2f6fc2a71a0b4a23 Signed-off-by: Romain Forlot --- ctl-lib/ctl-lua.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ctl-lib/ctl-lua.c') diff --git a/ctl-lib/ctl-lua.c b/ctl-lib/ctl-lua.c index f80668e..f8ab69d 100644 --- a/ctl-lib/ctl-lua.c +++ b/ctl-lib/ctl-lua.c @@ -1267,6 +1267,7 @@ PUBLIC int LuaConfigLoad (AFB_ApiT apiHandle) { return 0; OnErrorExit: + free(luaState); return 1; } @@ -1324,6 +1325,7 @@ PUBLIC int LuaConfigExec (AFB_ApiT apiHandle, const char* prefix) { } } + json_object_put(luaScriptPathJ); // no policy config found remove control API from binder if (index == 0) { AFB_ApiWarning (apiHandle, "POLICY-INIT:WARNING (setenv CONTROL_LUA_PATH) No LUA '%s*.lua' in '%s'", fullprefix, dirList); -- cgit 1.2.3-korg