projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
954ec10
)
fix memory leak in ares_getnameinfo
author
Andrew C. Morrow
<andrew.c.morrow@gmail.com>
Wed, 16 Jun 2010 02:18:24 +0000
(10:18 +0800)
committer
Daniel Stenberg
<daniel@haxx.se>
Wed, 16 Jun 2010 07:44:19 +0000
(15:44 +0800)
ares_getnameinfo.c
patch
|
blob
|
history
diff --git
a/ares_getnameinfo.c
b/ares_getnameinfo.c
index
fc4b7fa
..
8ae2f02
100644
(file)
--- 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);