relay: Fix memory leak on BUG() code path

Introduced in bf10206e9e which is not
released yet thus no changes file.

Found by Coverity with cid #1495786.

Fixes #40532

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2022-01-19 13:02:33 -05:00
parent 8e407e3329
commit 222fbba4ff

View File

@ -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); const tor_addr_port_t *ap = extend_info_get_orport(ei, family);
if (BUG(!ap)) { if (BUG(!ap)) {
/* Not much we can do here to recover apart from screaming loudly. */ /* Not much we can do here to recover apart from screaming loudly. */
extend_info_free(ei);
return; return;
} }
log_info(LD_CIRC, "Testing %s of my %s ORPort: %s.", log_info(LD_CIRC, "Testing %s of my %s ORPort: %s.",