From 222fbba4ff89dc69aff6dec4b524ca21dc28bf82 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 19 Jan 2022 13:02:33 -0500 Subject: [PATCH] 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 --- 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.",