comparison dbutil.c @ 239:e5ad9fa8b1fa

add a missing freeaddrinfo()
author Matt Johnston <matt@ucc.asn.au>
date Mon, 05 Sep 2005 12:12:55 +0000
parents 65585699d980
children 3311f4aa52cb
comparison
equal deleted inserted replaced
238:e923801a7678 239:e5ad9fa8b1fa
184 int len; 184 int len;
185 len = 20 + strlen(gai_strerror(err)); 185 len = 20 + strlen(gai_strerror(err));
186 *errstring = (char*)m_malloc(len); 186 *errstring = (char*)m_malloc(len);
187 snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); 187 snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
188 } 188 }
189 if (res0) {
190 freeaddrinfo(res0);
191 res0 = NULL;
192 }
189 TRACE(("leave dropbear_listen: failed resolving")) 193 TRACE(("leave dropbear_listen: failed resolving"))
190 return -1; 194 return -1;
191 } 195 }
192 196
193 197
233 } 237 }
234 238
235 *maxfd = MAX(*maxfd, sock); 239 *maxfd = MAX(*maxfd, sock);
236 240
237 nsock++; 241 nsock++;
242 }
243
244 if (res0) {
245 freeaddrinfo(res0);
246 res0 = NULL;
238 } 247 }
239 248
240 if (nsock == 0) { 249 if (nsock == 0) {
241 if (errstring != NULL && *errstring == NULL) { 250 if (errstring != NULL && *errstring == NULL) {
242 int len; 251 int len;