switch_xml_t xml = NULL;
char *mycmd = NULL;
+ lua_State *L = NULL;
if (!zstr(globals.xml_handler)) {
- lua_State *L = lua_init();
+ L = lua_init();
const char *str;
int error;
}
}
- lua_uninit(L);
-
}
end:
switch_safe_free(mycmd);
+ if (L) {
+ lua_uninit(L);
+ }
+
return xml;
}
SWITCH_STANDARD_API(lua_api_function)
{
- lua_State *L = lua_init();
char *mycmd;
int error;
if (zstr(cmd)) {
stream->write_function(stream, "");
} else {
-
+ lua_State *L = lua_init();
mycmd = strdup(cmd);
switch_assert(mycmd);