projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e457f2
)
Do not leak rr_name on failures inside ares_parse_ns_reply
author
Jakub Hrozek
<jhrozek@redhat.com>
Tue, 14 Jun 2011 14:40:07 +0000
(16:40 +0200)
committer
Jakub Hrozek
<jhrozek@redhat.com>
Tue, 14 Jun 2011 14:41:29 +0000
(16:41 +0200)
ares_parse_ns_reply.c
patch
|
blob
|
history
diff --git
a/ares_parse_ns_reply.c
b/ares_parse_ns_reply.c
index 73ab74cac27050e90ecf667c9201adfeb90e8bc3..5e9af71d1a9676f1d81992151f3eb3abe95ecbb3 100644
(file)
--- a/
ares_parse_ns_reply.c
+++ b/
ares_parse_ns_reply.c
@@
-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;
}