1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-05 16:50:11 +00:00

Do not leak rr_name on failures inside ares_parse_ns_reply

This commit is contained in:
Jakub Hrozek
2011-06-14 16:40:07 +02:00
parent 8e457f2c41
commit 978a929b40

View File

@ -103,6 +103,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
if ( aptr + RRFIXEDSZ > abuf + alen )
{
status = ARES_EBADRESP;
free(rr_name);
break;
}
rr_type = DNS_RR_TYPE( aptr );
@ -117,6 +118,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
&len);
if ( status != ARES_SUCCESS )
{
free(rr_name);
break;
}