# HG changeset patch # User Matt Johnston # Date 1125922375 0 # Node ID e5ad9fa8b1faf4f596ee98c6c9c3b29869203f44 # Parent e923801a7678b84c05ad3c3b793bf52bd58a306b add a missing freeaddrinfo() diff -r e923801a7678 -r e5ad9fa8b1fa dbutil.c --- a/dbutil.c Fri Sep 02 15:35:18 2005 +0000 +++ b/dbutil.c Mon Sep 05 12:12:55 2005 +0000 @@ -186,6 +186,10 @@ *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 @@ nsock++; } + if (res0) { + freeaddrinfo(res0); + res0 = NULL; + } + if (nsock == 0) { if (errstring != NULL && *errstring == NULL) { int len;