From: Alexander Færøy Date: Fri, 21 Jul 2023 00:53:12 +0000 (+0200) Subject: Clean-up Managed Proxy state in PT tests. X-Git-Tag: tor-0.4.8.13~6^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1941f25f4ccdab3f0a94ccac8232c958153e3f2a;p=thirdparty%2Ftor.git Clean-up Managed Proxy state in PT tests. This patch makes sure we clean up our version and implementation fields in our Managed Proxy struct after each test run. This was detected by LeakSanitizer. See: tpo/core/tor#11101. --- diff --git a/src/test/test_pt.c b/src/test/test_pt.c index 29146a4193..62519a235f 100644 --- a/src/test/test_pt.c +++ b/src/test/test_pt.c @@ -31,6 +31,9 @@ reset_mp(managed_proxy_t *mp) mp->conf_state = PT_PROTO_LAUNCHED; SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t)); smartlist_clear(mp->transports); + + tor_free(mp->version); + tor_free(mp->implementation); } static void