diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-05-27 07:10:36 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-05-27 07:10:36 +0000 |
commit | c2e8ba0fbaaf6e9dc73df9c3ede3dcf5986ef9c2 (patch) | |
tree | 88e10445614ad9148ac5baade92a39c4e46f1144 | |
parent | a5360255bad2429ca9be414a212fbaadb3b8987e (diff) |
free() allocated memory when the ares search can't be made
-rw-r--r-- | ares/ares_search.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ares/ares_search.c b/ares/ares_search.c index dab42368a..96a2f1f91 100644 --- a/ares/ares_search.c +++ b/ares/ares_search.c @@ -124,7 +124,12 @@ void ares_search(ares_channel channel, const char *name, int dnsclass, free(s); } else + { + /* failed, free the malloc()ed memory */ + free(squery->name); + free(squery); callback(arg, status, NULL, 0); + } } } |