Skip to contentSkip to conversation

Fix memory leak in misc unit test

PATCH In review Arne Schwabe 2 participants 2 messages May 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix memory leak in misc unit test

Detected-by clang -fsanitize=address
---
 tests/unit_tests/openvpn/test_misc.c | 1 +
 1 file changed, 1 insertion(+)
tests/unit_tests/openvpn/test_misc.c +1 -0
index 15f6cbff6..c3bea8fc8 100644
@@ -70,6 +70,7 @@ test_compat_lzo_string(void **state)
     /* 999 -> 1000, 3 to 4 chars */
     assert_string_equal(output, "V4,dev-type tun,link-mtu 1000,tun-mtu 1400,proto UDPv4,auth SHA1,keysize 128,key-method 2,tls-server,comp-lzo");
 
+    gc_free(&gc);
 };
 
 const struct CMUnitTest misc_tests[] = {
Signature · 1 line
2.31.1
Acked-by on v1 1/1
#1 lore raw

Stare-at-code confirms. "What goes in needs to come out" :-)

Your patch has been applied to the master branch.

commit 4a35d38efa74becf99ae9c6711f5c10c4b60f84b

Author: Arne Schwabe
Date:   Mon May 3 13:40:43 2021 +0200
     Fix memory leak in misc unit test

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg22292.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering