Skip to content
Snippets Groups Projects
Commit 8254bbae authored by Yang Tse's avatar Yang Tse
Browse files

protect against 'use after free' or race condition

parent e7886aa9
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment