]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-ebpf: simplify free function
authorEric Leblond <eric@regit.org>
Mon, 10 Jun 2019 10:23:11 +0000 (12:23 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2019 05:07:02 +0000 (07:07 +0200)
First key can't be null.

src/util-ebpf.c

index 4b6d0c21e9370926140e26c926f277874af5aba3..4136b8e38a7a34520ad8ef42fe8f98127640dbf9 100644 (file)
@@ -559,9 +559,7 @@ void EBPFBypassFree(void *data)
     EBPFBypassData *eb = (EBPFBypassData *)data;
     if (eb == NULL)
         return;
-    if (eb->key[0]) {
-        SCFree(eb->key[0]);
-    }
+    SCFree(eb->key[0]);
     if (eb->key[1]) {
         SCFree(eb->key[1]);
     }