summaryrefslogtreecommitdiff
path: root/ares_parse_soa_reply.c
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-10 16:24:08 +0900
committerYu Jiung <jiung.yu@samsung.com>2016-11-10 16:25:02 +0900
commit8166b0204b6945a4fdb89bbae0b0b7168a7cf6e8 (patch)
tree81f0750d91aa467df3ee81cf30d22a65db2e6685 /ares_parse_soa_reply.c
parentccccebb78520ec3a26a18370936516b12ae5d53a (diff)
parent45e88a8337839e5fd88519bc55467053d521c9f6 (diff)
downloadc-ares-accepted/tizen/4.0/base/20170828.221324.tar.gz
c-ares-accepted/tizen/4.0/base/20170828.221324.tar.bz2
c-ares-accepted/tizen/4.0/base/20170828.221324.zip
Conflicts: packaging/c-ares.spec Change-Id: I1ec10e394aed3ef19ee21fefbe3aba7d7a615c74
Diffstat (limited to 'ares_parse_soa_reply.c')
-rw-r--r--ares_parse_soa_reply.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ares_parse_soa_reply.c b/ares_parse_soa_reply.c
index da1c6dc..35af0a7 100644
--- a/ares_parse_soa_reply.c
+++ b/ares_parse_soa_reply.c
@@ -86,7 +86,10 @@ ares_parse_soa_reply(const unsigned char *abuf, int alen,
/* allocate result struct */
soa = ares_malloc_data(ARES_DATATYPE_SOA_REPLY);
if (!soa)
- return ARES_ENOMEM;
+ {
+ status = ARES_ENOMEM;
+ goto failed_stat;
+ }
/* nsname */
status = ares__expand_name_for_response(aptr, abuf, alen, &soa->nsname, &len);
@@ -109,8 +112,8 @@ ares_parse_soa_reply(const unsigned char *abuf, int alen,
soa->expire = DNS__32BIT(aptr + 3 * 4);
soa->minttl = DNS__32BIT(aptr + 4 * 4);
- free(qname);
- free(rr_name);
+ ares_free(qname);
+ ares_free(rr_name);
*soa_out = soa;
@@ -122,9 +125,9 @@ failed:
failed_stat:
ares_free_data(soa);
if (qname)
- free(qname);
+ ares_free(qname);
if (rr_name)
- free(rr_name);
+ ares_free(rr_name);
return status;
}