diff options
Diffstat (limited to 'dbutil.c')
-rw-r--r-- | dbutil.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -190,6 +190,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; } @@ -241,6 +245,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; |