aboutsummaryrefslogtreecommitdiff
path: root/src/feature/rend
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-11-05 08:24:46 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-11-05 08:24:46 -0500
commit326f82db0420b777038bba826ff0b78ffd307490 (patch)
tree0c3e06d8e3c8e66ede5cc83349e41c04747c712a /src/feature/rend
parent6e023d55851f4287ffac5eef83721a43ee0a4319 (diff)
downloadtor-326f82db0420b777038bba826ff0b78ffd307490.tar.gz
tor-326f82db0420b777038bba826ff0b78ffd307490.zip
hs-v2: Fix memory leak in error code path
Coverity CID: 1455168 Closes #32356 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/rend')
-rw-r--r--src/feature/rend/rendclient.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c
index bc94c88efb..6f4ee8b8c1 100644
--- a/src/feature/rend/rendclient.c
+++ b/src/feature/rend/rendclient.c
@@ -1058,6 +1058,7 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry,
/* Get service ID so we can use it to query the failure cache. If we fail to
* parse it, this cache entry is no good. */
if (BUG(rend_get_service_id(entry->parsed->pk, service_id) < 0)) {
+ smartlist_free(usable_nodes);
return NULL;
}