]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rule-parsing: remove unnecessary code 1905/head
authorAndreas Herz <andi@geekosphere.org>
Fri, 4 Mar 2016 21:29:02 +0000 (22:29 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 5 Mar 2016 08:36:14 +0000 (09:36 +0100)
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.

src/detect-msg.c

index eddf311972568c0a58cd636c73ad6bd860004c7d..5a5f4c5dfd513fbde8565f0ff6f8a066664c1204 100644 (file)
@@ -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;