From: Yang Tse Date: Fri, 17 Oct 2008 15:29:35 +0000 (+0000) Subject: protect against 'use after free' or race condition X-Git-Tag: curl-7_19_1~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8254bbae56c27add4cb6217e2f1478817cd9f9ee;p=thirdparty%2Fcurl.git protect against 'use after free' or race condition --- diff --git a/lib/hostip.c b/lib/hostip.c index cee5bc2d80..03dcce86cc 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -732,6 +732,7 @@ void Curl_freeaddrinfo(Curl_addrinfo *ai) free(ai->ai_addr); if(ai->ai_canonname) free(ai->ai_canonname); + memset(ai, 0, sizeof(Curl_addrinfo)); free(ai); ai = next; }