From: Andreas Herz Date: Fri, 4 Mar 2016 21:29:02 +0000 (+0100) Subject: rule-parsing: remove unnecessary code X-Git-Tag: suricata-3.0.1RC1~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1905%2Fhead;p=thirdparty%2Fsuricata.git rule-parsing: remove unnecessary code Those lines were included former to prevent possible null pointer dereference but that won't happen anymore with the rest of the rework done in the code. The code even results in a control flow issue reported by coverity scan, so just remove it. --- diff --git a/src/detect-msg.c b/src/detect-msg.c index eddf311972..5a5f4c5dfd 100644 --- a/src/detect-msg.c +++ b/src/detect-msg.c @@ -75,10 +75,6 @@ static int DetectMsgSetup (DetectEngineCtx *de_ctx, Signature *s, char *msgstr) goto error; } - /* make sure that we don't proceed with null pointer */ - if (unlikely(str == NULL)) - goto error; - len = strlen(str); if (len == 0) goto error;