detect/lua: minor code cleanup

pull/12569/head
Victor Julien 2 years ago committed by Victor Julien
parent 3f53d657a9
commit 4dbd6ccd2c

@ -898,20 +898,18 @@ error:
*/
static int DetectLuaSetup (DetectEngineCtx *de_ctx, Signature *s, const char *str)
{
DetectLuaData *lua = NULL;
/* First check if Lua rules are enabled, by default Lua in rules
* is disabled. */
int enabled = 0;
(void)ConfGetBool("security.lua.allow-rules", &enabled);
if (!enabled) {
SCLogError("Lua rules disabled by security configuration: security.lua.allow-rules");
goto error;
return -1;
}
lua = DetectLuaParse(de_ctx, str);
DetectLuaData *lua = DetectLuaParse(de_ctx, str);
if (lua == NULL)
goto error;
return -1;
/* Load lua sandbox configurations */
intmax_t lua_alloc_limit = DEFAULT_LUA_ALLOC_LIMIT;

Loading…
Cancel
Save