diff options
author | Andrew C. Morrow <andrew.c.morrow@gmail.com> | 2010-06-16 10:18:24 +0800 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-06-16 15:44:19 +0800 |
commit | d6b869894190e15960987786d337dc8d42f8285b (patch) | |
tree | 5f758ca3f09cecadf4d96f73198a08b1f1363073 /ares_getnameinfo.c | |
parent | 954ec10e5a33f89356ae9ce67d6ad442eb523442 (diff) | |
download | c-ares-d6b869894190e15960987786d337dc8d42f8285b.tar.gz c-ares-d6b869894190e15960987786d337dc8d42f8285b.tar.bz2 c-ares-d6b869894190e15960987786d337dc8d42f8285b.zip |
fix memory leak in ares_getnameinfo
Diffstat (limited to 'ares_getnameinfo.c')
-rw-r--r-- | ares_getnameinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ares_getnameinfo.c b/ares_getnameinfo.c index fc4b7fa..8ae2f02 100644 --- a/ares_getnameinfo.c +++ b/ares_getnameinfo.c @@ -243,6 +243,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, (char *)(host->h_name), service); + free(niquery); return; } /* We couldn't find the host, but it's OK, we can use the IP */ @@ -273,6 +274,7 @@ static void nameinfo_callback(void *arg, int status, int timeouts, } niquery->callback(niquery->arg, ARES_SUCCESS, niquery->timeouts, ipbuf, service); + free(niquery); return; } niquery->callback(niquery->arg, status, niquery->timeouts, NULL, NULL); |