From: Arne Schwabe Date: Mon, 3 May 2021 11:40:43 +0000 (+0200) Subject: Fix memory leak in misc unit test X-Git-Tag: v2.6_beta1~511 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a35d38efa74becf99ae9c6711f5c10c4b60f84b;p=thirdparty%2Fopenvpn.git Fix memory leak in misc unit test Detected-by: clang -fsanitize=address Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20210503114043.3909319-1-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22292.html Signed-off-by: Gert Doering --- diff --git a/tests/unit_tests/openvpn/test_misc.c b/tests/unit_tests/openvpn/test_misc.c index 15f6cbff6..c3bea8fc8 100644 --- a/tests/unit_tests/openvpn/test_misc.c +++ b/tests/unit_tests/openvpn/test_misc.c @@ -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[] = {