]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unittests: clean up memory for icmpv4 tests
authorVictor Julien <vjulien@oisf.net>
Sat, 11 Oct 2025 10:25:22 +0000 (12:25 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 14 Oct 2025 17:40:57 +0000 (19:40 +0200)
src/decode-icmpv4.c

index 33ed09ada447ab982c552c3b56b01165efdc6623..5442197c8a5b382bbf72f2e18561fb4183f65ad7 100644 (file)
@@ -405,7 +405,7 @@ static int DecodeICMPV4test01(void)
     FAIL_IF_NOT(icmpv4h->code == 0);
 
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     PASS;
 }
 
@@ -454,7 +454,7 @@ static int DecodeICMPV4test02(void)
     FAIL_IF_NOT(icmpv4h->code == 0);
 
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     PASS;
 }
 
@@ -517,7 +517,7 @@ static int DecodeICMPV4test03(void)
     FAIL_IF_NOT(strcmp(d, "209.85.227.147") == 0);
 
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     PASS;
 }
 
@@ -587,7 +587,7 @@ static int DecodeICMPV4test04(void)
 
 end:
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     return ret;
 }
 
@@ -655,7 +655,7 @@ static int DecodeICMPV4test05(void)
 
 end:
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     return ret;
 }
 
@@ -738,7 +738,7 @@ static int ICMPV4InvalidType07(void)
     }
 
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     return ret;
 }
 
@@ -782,7 +782,7 @@ static int DecodeICMPV4test08(void)
     FAIL_IF_NOT(icmpv4h->code == 0);
 
     FlowShutdown();
-    SCFree(p);
+    PacketFree(p);
     PASS;
 }
 #endif /* UNITTESTS */