executor/executor: Free lcmd on error

This commit is contained in:
ZyX
2017-01-21 01:42:50 +03:00
parent bca9c2f3c4
commit 53b89c1dcf

View File

@@ -221,6 +221,9 @@ static int nlua_eval_lua_string(lua_State *lstate)
if (luaL_loadbuffer(lstate, lcmd, lcmd_len, NLUA_EVAL_NAME)) {
nlua_error(lstate,
_("E5107: Error while creating lua chunk for luaeval(): %.*s"));
if (lcmd != (char *)IObuff) {
xfree(lcmd);
}
return 0;
}
if (lcmd != (char *)IObuff) {