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

[tor-commits] [tor/main] relay: Fix memory leak on BUG() code path



commit 222fbba4ff89dc69aff6dec4b524ca21dc28bf82
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Wed Jan 19 13:02:33 2022 -0500

    relay: Fix memory leak on BUG() code path
    
    Introduced in bf10206e9e23ac0ded2cc9727666696ea25d5636 which is not
    released yet thus no changes file.
    
    Found by Coverity with cid #1495786.
    
    Fixes #40532
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/feature/relay/selftest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index a791079bd8..d029c05053 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -256,6 +256,7 @@ router_do_orport_reachability_checks(const routerinfo_t *me,
     const tor_addr_port_t *ap = extend_info_get_orport(ei, family);
     if (BUG(!ap)) {
       /* Not much we can do here to recover apart from screaming loudly. */
+      extend_info_free(ei);
       return;
     }
     log_info(LD_CIRC, "Testing %s of my %s ORPort: %s.",



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