ares_parse_aaaa_reply: fix memory leak

an allocated buffer was not freed in the successful case.
pull/9/head
Daniel Stenberg 12 years ago
parent 805c736e36
commit 50f25d8a4b
  1. 1
      ares_parse_aaaa_reply.c

@ -242,6 +242,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
hostent->h_addr_list[i] = (char *) &addrs[i];
hostent->h_addr_list[naddrs] = NULL;
*host = hostent;
free(addrs); /* since it isn't used anymore! */
return ARES_SUCCESS;
}
free(hostent);

Loading…
Cancel
Save