Skip to content

Commit

Permalink
Do not leak rr_name on failures inside ares_parse_ns_reply
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrozek committed Jun 14, 2011
1 parent 8e457f2 commit 978a929
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ares_parse_ns_reply.c
Expand Up @@ -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 );
Expand All @@ -117,6 +118,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
&len);
if ( status != ARES_SUCCESS )
{
free(rr_name);
break;
}

Expand Down

0 comments on commit 978a929

Please sign in to comment.