Fix a leak when launching listeners.

svn:r5173
This commit is contained in:
Nick Mathewson 2005-09-30 21:28:00 +00:00
parent 23864ad423
commit 5c5d2e82e6

View File

@ -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;
}