]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/ipv6: remove useless code
authorVictor Julien <vjulien@oisf.net>
Tue, 26 Apr 2022 18:02:19 +0000 (20:02 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 27 Apr 2022 10:17:46 +0000 (12:17 +0200)
commitbad900516133a81afb0a6d3982fa3de5871e6ba7
tree86f64166322e6b2df3fe739e9a65fd6d0703c175
parentea2d0ecf08842d52f77d1a88a184a85960999e1e
detect/ipv6: remove useless code

Remove useless allocation and free.

Found by cppcheck as a potential issue:

src/detect-engine-address-ipv6.c:385:12: warning: Either the condition 'tmp!=NULL' is redundant or there is possible null pointer dereference: tmp. [nullPointerRedundantCheck]
    memset(tmp,0,sizeof(DetectAddress));
           ^
src/detect-engine-address-ipv6.c:525:13: note: Assuming that condition 'tmp!=NULL' is not redundant
    if (tmp != NULL)
            ^
src/detect-engine-address-ipv6.c:385:12: note: Null pointer dereference
    memset(tmp,0,sizeof(DetectAddress));
           ^

But code turned out not to do anything, so removed.

Bug: #5291.
src/detect-engine-address-ipv6.c