]> Kevux Git Server - fll/commitdiff
Bugfix: Unit test should reset size after free.
authorKevin Day <thekevinday@gmail.com>
Tue, 5 Dec 2023 06:01:41 +0000 (00:01 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 5 Dec 2023 06:01:41 +0000 (00:01 -0600)
The size must be reset due to the manual free otherwise a memory error occurs later on.

level_0/f_network/tests/unit/c/test-network-to_ip_string.c

index c428e42dd27f077604f0b0cdd21dac0ed14e1aa0..e4df1bbc62ce08bdf1ad3522110c8cc8a6a2823c 100644 (file)
@@ -96,6 +96,7 @@ void test__f_network_to_ip_string__works(void **state) {
 
   family.type = f_network_family_ip_6_e;
   ip.used = 0;
+  ip.size = 0;
 
   {
     will_return(__wrap_inet_ntop, false);