diff options
author | Micah Elizabeth Scott <beth@torproject.org> | 2023-03-15 10:41:22 -0700 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-10 07:38:28 -0700 |
commit | 700814a3a117652682ccdf1ea591584b5eca1ff6 (patch) | |
tree | 7254ebca970923f3088b84e20f8596f505f17084 /src/test | |
parent | 00d9e0d252687110189ea5a1ed0dce99a7984681 (diff) | |
download | tor-700814a3a117652682ccdf1ea591584b5eca1ff6.tar.gz tor-700814a3a117652682ccdf1ea591584b5eca1ff6.zip |
hs_pow: Fix nonce cache entry leak
This leak was showing up in address sanitizer runs of test_hs_pow,
but it will also happen during normal operation as seeds are rotated.
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_hs_pow.c | 1 | ||||
-rw-r--r-- | src/test/test_hs_pow_slow.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_hs_pow.c b/src/test/test_hs_pow.c index 877f022a79..edda3cd643 100644 --- a/src/test/test_hs_pow.c +++ b/src/test/test_hs_pow.c @@ -469,6 +469,7 @@ test_hs_pow_vectors(void *arg) trn_cell_introduce1_free(cell); trn_cell_introduce_encrypted_free(enc_cell); testing_hs_pow_service_free(tsvc); + hs_pow_remove_seed_from_cache(NULL); } struct testcase_t hs_pow_tests[] = { diff --git a/src/test/test_hs_pow_slow.c b/src/test/test_hs_pow_slow.c index 0c83922646..13d7111e88 100644 --- a/src/test/test_hs_pow_slow.c +++ b/src/test/test_hs_pow_slow.c @@ -228,6 +228,7 @@ test_hs_pow_vectors(void *arg) done: testing_disable_prefilled_rng(); + hs_pow_remove_seed_from_cache(NULL); } struct testcase_t slow_hs_pow_tests[] = { |