add a missing freeaddrinfo()

--HG--
extra : convert_revision : 861515d7429c76542803c49a1fc972cba6a760b4
This commit is contained in:
Matt Johnston 2005-09-05 12:12:55 +00:00
parent 5a6404712c
commit 21c4cd7cb2

View File

@ -186,6 +186,10 @@ int dropbear_listen(const char* address, const char* port,
*errstring = (char*)m_malloc(len);
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
}
if (res0) {
freeaddrinfo(res0);
res0 = NULL;
}
TRACE(("leave dropbear_listen: failed resolving"))
return -1;
}
@ -237,6 +241,11 @@ int dropbear_listen(const char* address, const char* port,
nsock++;
}
if (res0) {
freeaddrinfo(res0);
res0 = NULL;
}
if (nsock == 0) {
if (errstring != NULL && *errstring == NULL) {
int len;