]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs-v2: Fix memory leak in error code path
authorDavid Goulet <dgoulet@torproject.org>
Tue, 5 Nov 2019 13:24:46 +0000 (08:24 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 5 Nov 2019 13:24:46 +0000 (08:24 -0500)
Coverity CID: 1455168

Closes #32356

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/feature/rend/rendclient.c

index bc94c88efb5b40df37747a56e36a15891d7760c8..6f4ee8b8c15ed4ae28a163f16e77e355767e13a1 100644 (file)
@@ -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;
   }