aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-05-16 15:21:18 -0400
committerNick Mathewson <nickm@torproject.org>2019-05-16 15:21:18 -0400
commit0a9685b3a7437e8851f8cb65fea3d0a16b7833a7 (patch)
tree284ee560044b1b75bcd78fee0ba4b824a471116a /src/test/test_hs_common.c
parent1bf451cffba5da84166dda48ec957e0b9cf45bee (diff)
downloadtor-0a9685b3a7437e8851f8cb65fea3d0a16b7833a7.tar.gz
tor-0a9685b3a7437e8851f8cb65fea3d0a16b7833a7.zip
hs tests: explicitly free 'service' variable.
This should fix about 15 CID issues, where coverity can't tell that hs_free_all() frees the service we allocated.
Diffstat (limited to 'src/test/test_hs_common.c')
-rw-r--r--src/test/test_hs_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index bb41f1f870..abded6021e 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -603,6 +603,10 @@ test_desc_reupload_logic(void *arg)
SMARTLIST_FOREACH(ns->routerstatus_list,
routerstatus_t *, rs, routerstatus_free(rs));
smartlist_clear(ns->routerstatus_list);
+ if (service) {
+ remove_service(get_hs_service_map(), service);
+ hs_service_free(service);
+ }
networkstatus_vote_free(ns);
cleanup_nodelist();
hs_free_all();