summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/mainloop/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 3c057ad146..7ef7423b13 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -2900,6 +2900,9 @@ retry_all_listeners(smartlist_t *new_conns, int close_all_noncontrol)
} SMARTLIST_FOREACH_END(conn);
smartlist_free(listeners);
+ /* Cleanup any remaining listener replacement. */
+ SMARTLIST_FOREACH(replacements, listener_replacement_t *, r, tor_free(r));
+ smartlist_free(replacements);
if (old_or_port != router_get_advertised_or_port(options) ||
old_or_port_ipv6 != router_get_advertised_or_port_by_af(options,