mirror of
https://github.com/clearml/dropbear
synced 2025-03-04 02:57:46 +00:00
add a missing freeaddrinfo()
--HG-- extra : convert_revision : 861515d7429c76542803c49a1fc972cba6a760b4
This commit is contained in:
parent
5a6404712c
commit
21c4cd7cb2
9
dbutil.c
9
dbutil.c
@ -186,6 +186,10 @@ int dropbear_listen(const char* address, const char* port,
|
|||||||
*errstring = (char*)m_malloc(len);
|
*errstring = (char*)m_malloc(len);
|
||||||
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
|
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
|
||||||
}
|
}
|
||||||
|
if (res0) {
|
||||||
|
freeaddrinfo(res0);
|
||||||
|
res0 = NULL;
|
||||||
|
}
|
||||||
TRACE(("leave dropbear_listen: failed resolving"))
|
TRACE(("leave dropbear_listen: failed resolving"))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -237,6 +241,11 @@ int dropbear_listen(const char* address, const char* port,
|
|||||||
nsock++;
|
nsock++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (res0) {
|
||||||
|
freeaddrinfo(res0);
|
||||||
|
res0 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (nsock == 0) {
|
if (nsock == 0) {
|
||||||
if (errstring != NULL && *errstring == NULL) {
|
if (errstring != NULL && *errstring == NULL) {
|
||||||
int len;
|
int len;
|
||||||
|
Loading…
Reference in New Issue
Block a user