mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix a leak when launching listeners.
svn:r5173
This commit is contained in:
parent
23864ad423
commit
5c5d2e82e6
@ -858,12 +858,14 @@ retry_listeners(int type, config_line_t *cfg,
|
||||
line = NULL;
|
||||
SMARTLIST_FOREACH(launch, config_line_t *, wanted,
|
||||
{
|
||||
char *addr;
|
||||
char *addr=NULL;
|
||||
uint16_t port;
|
||||
if (! parse_addr_port(wanted->value, &addr, NULL, &port)) {
|
||||
int addr_matches = !strcasecmp(addr, conn->address);
|
||||
tor_free(addr);
|
||||
if (! port)
|
||||
port = port_option;
|
||||
if (port == conn->port && !strcasecmp(addr, conn->address)) {
|
||||
if (port == conn->port && addr_matches) {
|
||||
line = wanted;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user