diff --git a/src/detect-lua.c b/src/detect-lua.c index e0bc3d5fb2bc..e065b7baaec0 100644 --- a/src/detect-lua.c +++ b/src/detect-lua.c @@ -400,9 +400,8 @@ static void *DetectLuaThreadInit(void *data) if (lua->allow_restricted_functions) { luaL_openlibs(t->luastate); - } else { - SCLuaSbLoadLibs(t->luastate); } + SCLuaSbLoadLibs(t->luastate); LuaRegisterExtensions(t->luastate); @@ -515,9 +514,8 @@ static int DetectLuaSetupPrime(DetectEngineCtx *de_ctx, DetectLuaData *ld, const return -1; if (ld->allow_restricted_functions) { luaL_openlibs(luastate); - } else { - SCLuaSbLoadLibs(luastate); } + SCLuaSbLoadLibs(luastate); /* hackish, needed to allow unittests to pass buffers as scripts instead of files */ #ifdef UNITTESTS