1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 12:49:29 +00:00

Do not leak rr_name on failures inside ares_parse_aaaa_reply

This commit is contained in:
Jakub Hrozek
2011-06-14 16:46:13 +02:00
parent 978a929b40
commit 18b6d475dc

View File

@ -132,6 +132,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
aptr += len;
if (aptr + RRFIXEDSZ > abuf + alen)
{
free(rr_name);
status = ARES_EBADRESP;
break;
}
@ -149,6 +150,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
{
if (aptr + sizeof(struct ares_in6_addr) > abuf + alen)
{
free(rr_name);
status = ARES_EBADRESP;
break;
}
@ -159,6 +161,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
struct ares_addr6ttl * const at = &addrttls[naddrs];
if (aptr + sizeof(struct ares_in6_addr) > abuf + alen)
{
free(rr_name);
status = ARES_EBADRESP;
break;
}