From 1941f25f4ccdab3f0a94ccac8232c958153e3f2a Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Fri, 21 Jul 2023 02:53:12 +0200 Subject: 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. --- src/test/test_pt.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3-54-g00ecf