]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: inject packet cleanup
authorVictor Julien <victor@inliniac.net>
Mon, 4 Nov 2019 10:20:40 +0000 (11:20 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 7 Feb 2020 14:43:10 +0000 (15:43 +0100)
src/detect-engine.c

index f1fca6235c6b8b9f401848a4e4d4ed3c4012d52e..5fd954f8f070c5b7f924b8656f6ad6e2494ca9d2 100644 (file)
@@ -1724,10 +1724,9 @@ static void InjectPackets(ThreadVars **detect_tvs,
                           DetectEngineThreadCtx **new_det_ctx,
                           int no_of_detect_tvs)
 {
-    int i;
     /* inject a fake packet if the detect thread isn't using the new ctx yet,
      * this speeds up the process */
-    for (i = 0; i < no_of_detect_tvs; i++) {
+    for (int i = 0; i < no_of_detect_tvs; i++) {
         if (SC_ATOMIC_GET(new_det_ctx[i]->so_far_used_by_detect) != 1) {
             if (detect_tvs[i]->inq != NULL) {
                 Packet *p = PacketGetFromAlloc();