summaryrefslogtreecommitdiff
path: root/ares_gethostbyaddr.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_gethostbyaddr.c
parentccccebb78520ec3a26a18370936516b12ae5d53a (diff)
parent45e88a8337839e5fd88519bc55467053d521c9f6 (diff)
downloadc-ares-submit/tizen_4.0_base/20170828.000001.tar.gz
c-ares-submit/tizen_4.0_base/20170828.000001.tar.bz2
c-ares-submit/tizen_4.0_base/20170828.000001.zip
Conflicts: packaging/c-ares.spec Change-Id: I1ec10e394aed3ef19ee21fefbe3aba7d7a615c74
Diffstat (limited to 'ares_gethostbyaddr.c')
-rw-r--r--ares_gethostbyaddr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c
index 0c832bb..9258919 100644
--- a/ares_gethostbyaddr.c
+++ b/ares_gethostbyaddr.c
@@ -79,7 +79,7 @@ void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
return;
}
- aquery = malloc(sizeof(struct addr_query));
+ aquery = ares_malloc(sizeof(struct addr_query));
if (!aquery)
{
callback(arg, ARES_ENOMEM, 0, NULL);
@@ -169,7 +169,7 @@ static void end_aquery(struct addr_query *aquery, int status,
aquery->callback(aquery->arg, status, aquery->timeouts, host);
if (host)
ares_free_hostent(host);
- free(aquery);
+ ares_free(aquery);
}
static int file_lookup(struct ares_addr *addr, struct hostent **host)
@@ -215,7 +215,7 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
return ARES_ENOTFOUND;
#endif
- fp = fopen(PATH_HOSTS, "re");
+ fp = fopen(PATH_HOSTS, "r");
if (!fp)
{
error = ERRNO;