From: Daniel Stenberg Date: Thu, 27 May 2004 07:10:36 +0000 (+0000) Subject: free() allocated memory when the ares search can't be made X-Git-Tag: curl-7_12_0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2e8ba0fbaaf6e9dc73df9c3ede3dcf5986ef9c2;p=thirdparty%2Fcurl.git free() allocated memory when the ares search can't be made --- diff --git a/ares/ares_search.c b/ares/ares_search.c index dab42368a0..96a2f1f914 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); + } } }