From c2e8ba0fbaaf6e9dc73df9c3ede3dcf5986ef9c2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 27 May 2004 07:10:36 +0000 Subject: free() allocated memory when the ares search can't be made --- ares/ares_search.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ares') 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); + } } } -- cgit v1.2.3