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 | 080f8f4cd464e1020019527709c3621565967e8e (patch) | |
tree | 3f4c04892afb819dfb1b45d77d8083d19b9eeaed | |
parent | 76f520955d1ffbe01ec4792f2c47a59cb5e4cbc8 (diff) | |
download | c-ares-080f8f4cd464e1020019527709c3621565967e8e.tar.gz c-ares-080f8f4cd464e1020019527709c3621565967e8e.tar.bz2 c-ares-080f8f4cd464e1020019527709c3621565967e8e.zip |
free() allocated memory when the ares search can't be made
-rw-r--r-- | ares_search.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ares_search.c b/ares_search.c index dab4236..96a2f1f 100644 --- a/ares_search.c +++ b/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); + } } } |