summaryrefslogtreecommitdiff
path: root/ares_send.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_send.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_send.c')
-rw-r--r--ares_send.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ares_send.c b/ares_send.c
index 1a450b1..88c0035 100644
--- a/ares_send.c
+++ b/ares_send.c
@@ -47,25 +47,25 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
}
/* Allocate space for query and allocated fields. */
- query = malloc(sizeof(struct query));
+ query = ares_malloc(sizeof(struct query));
if (!query)
{
callback(arg, ARES_ENOMEM, 0, NULL, 0);
return;
}
- query->tcpbuf = malloc(qlen + 2);
+ query->tcpbuf = ares_malloc(qlen + 2);
if (!query->tcpbuf)
{
- free(query);
+ ares_free(query);
callback(arg, ARES_ENOMEM, 0, NULL, 0);
return;
}
- query->server_info = malloc(channel->nservers *
- sizeof(query->server_info[0]));
+ query->server_info = ares_malloc(channel->nservers *
+ sizeof(query->server_info[0]));
if (!query->server_info)
{
- free(query->tcpbuf);
- free(query);
+ ares_free(query->tcpbuf);
+ ares_free(query);
callback(arg, ARES_ENOMEM, 0, NULL, 0);
return;
}