diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-04 14:13:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-04 14:13:30 -0400 |
commit | 29ae8dcf96532eb5be8023a29de404576d5d2339 (patch) | |
tree | 4c107a58eaf8a372371cf2ce966f039cb2a56fb0 /src/test/test_hs_cache.c | |
parent | 954fb99a48ea12a6c1aa48e2ce1a8acf8fbe456b (diff) | |
download | tor-29ae8dcf96532eb5be8023a29de404576d5d2339.tar.gz tor-29ae8dcf96532eb5be8023a29de404576d5d2339.zip |
Fix a bunch of leaks in hs_cache/upload_and_download_hs_desc
Diffstat (limited to 'src/test/test_hs_cache.c')
-rw-r--r-- | src/test/test_hs_cache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c index dc7cf03d81..e05e1f2d88 100644 --- a/src/test/test_hs_cache.c +++ b/src/test/test_hs_cache.c @@ -6,6 +6,7 @@ * \brief Test hidden service caches. */ +#define CONNECTION_PRIVATE #define HS_CACHE_PRIVATE #include "ed25519_cert.h" @@ -322,10 +323,13 @@ helper_fetch_desc_from_hsdir(const ed25519_public_key_t *blinded_key) fetch_from_buf_http(TO_CONN(conn)->outbuf, &headers, MAX_HEADERS_SIZE, &received_desc, &body_used, 10000, 0); + tor_free(headers); } done: tor_free(hsdir_query_str); + if (conn) + connection_free_(TO_CONN(conn)); return received_desc; } @@ -373,6 +377,7 @@ test_upload_and_download_hs_desc(void *arg) done: tor_free(received_desc_str); tor_free(published_desc_str); + hs_descriptor_free(published_desc); } /* Test that HSDirs reject outdated descriptors based on their revision |