1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

protect against 'use after free' or race condition

This commit is contained in:
Yang Tse 2008-10-17 15:29:35 +00:00
parent e7886aa9b4
commit 8254bbae56

View File

@ -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;
}