diff options
author | Alexander Færøy <ahf@torproject.org> | 2023-07-21 02:53:12 +0200 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2024-06-18 15:15:32 -0400 |
commit | 1941f25f4ccdab3f0a94ccac8232c958153e3f2a (patch) | |
tree | 626385f6e1ee939d52c54dcfd96c66471b617028 | |
parent | 3c8035b452579824f7e171846ab3ec33248d753f (diff) | |
download | tor-1941f25f4ccdab3f0a94ccac8232c958153e3f2a.tar.gz tor-1941f25f4ccdab3f0a94ccac8232c958153e3f2a.zip |
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.
-rw-r--r-- | src/test/test_pt.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |