From b43e7eef7b0da7cf1b3a5eaa694d6d58e0bfee71 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 30 May 2011 10:01:03 +0200 Subject: [PATCH] Check return code of DetectEngineCtxInit at startup. --- src/suricata.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/suricata.c b/src/suricata.c index 9f2a27401a..0e9f484bce 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1036,6 +1036,11 @@ int main(int argc, char **argv) FlowInitConfig(FLOW_VERBOSE); DetectEngineCtx *de_ctx = DetectEngineCtxInit(); + if (de_ctx == NULL) { + SCLogError(SC_ERR_INITIALIZATION, "initializing detection engine " + "context failed."); + exit(EXIT_FAILURE); + } SCClassConfLoadClassficationConfigFile(de_ctx);