[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] hs-v2: Fix memory leak in error code path



commit 326f82db0420b777038bba826ff0b78ffd307490
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Tue Nov 5 08:24:46 2019 -0500

    hs-v2: Fix memory leak in error code path
    
    Coverity CID: 1455168
    
    Closes #32356
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/feature/rend/rendclient.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c
index bc94c88ef..6f4ee8b8c 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;
   }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits