summaryrefslogtreecommitdiff
path: root/ares_query.c
diff options
context:
space:
mode:
authorYu Jiung <jiung.yu@samsung.com>2016-11-09 11:18:45 +0900
committerYu Jiung <jiung.yu@samsung.com>2016-11-09 11:18:55 +0900
commiteb886f120599b2a184db20b527db6dfdfcb7852e (patch)
treeb49d8075742c4a27b237fa183cb68670e421d398 /ares_query.c
parentb6627e2c19506bd30328969ea8aab73fa0945f36 (diff)
downloadc-ares-eb886f120599b2a184db20b527db6dfdfcb7852e.tar.gz
c-ares-eb886f120599b2a184db20b527db6dfdfcb7852e.tar.bz2
c-ares-eb886f120599b2a184db20b527db6dfdfcb7852e.zip
Imported Upstream version 1.11.0upstream/1.11.0
Change-Id: I238c24b75a10aa902d9bc4076ed68b76b5e2a750
Diffstat (limited to 'ares_query.c')
-rw-r--r--ares_query.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ares_query.c b/ares_query.c
index 4bc9c25..b38b8a6 100644
--- a/ares_query.c
+++ b/ares_query.c
@@ -121,7 +121,7 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
&qlen, (channel->flags & ARES_FLAG_EDNS) ? channel->ednspsz : 0);
if (status != ARES_SUCCESS)
{
- if (qbuf != NULL) free(qbuf);
+ if (qbuf != NULL) ares_free(qbuf);
callback(arg, status, 0, NULL, 0);
return;
}
@@ -129,7 +129,7 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
channel->next_id = generate_unique_id(channel);
/* Allocate and fill in the query structure. */
- qquery = malloc(sizeof(struct qquery));
+ qquery = ares_malloc(sizeof(struct qquery));
if (!qquery)
{
ares_free_string(qbuf);
@@ -182,5 +182,5 @@ static void qcallback(void *arg, int status, int timeouts, unsigned char *abuf,
}
qquery->callback(qquery->arg, status, timeouts, abuf, alen);
}
- free(qquery);
+ ares_free(qquery);
}