From fe3484fbc0976e2cda984a71cefb1b01857876dc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 24 Feb 2014 16:41:27 +0100 Subject: [PATCH] output-lua: improve error checking for init() If init doesn't properly init the script, skip the script and error out. --- src/output-lua.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/output-lua.c b/src/output-lua.c index 1785dc7336..a17a3ae264 100644 --- a/src/output-lua.c +++ b/src/output-lua.c @@ -557,6 +557,10 @@ static OutputCtx *OutputLuaLogInit(ConfNode *conf) om->PacketConditionFunc = LuaPacketConditionAlerts; } else if (opts.file) { om->FileLogFunc = LuaFileLogger; + } else { + SCLogError(SC_ERR_LUAJIT_ERROR, "failed to setup thread module"); + SCFree(om); + continue; } TAILQ_INSERT_TAIL(&output_ctx->submodules, om, entries);