aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-17 15:29:35 +0000
committerYang Tse <yangsita@gmail.com>2008-10-17 15:29:35 +0000
commit8254bbae56c27add4cb6217e2f1478817cd9f9ee (patch)
tree9caf1aa69dc8e4497d446281ee279565a9afc140 /lib
parente7886aa9b4dbd436708dfb21a79f19e7b1f2c02c (diff)
protect against 'use after free' or race condition
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index cee5bc2d8..03dcce86c 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;
}