diff options
author | Yang Tse <yangsita@gmail.com> | 2008-10-17 15:29:35 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-10-17 15:29:35 +0000 |
commit | 8254bbae56c27add4cb6217e2f1478817cd9f9ee (patch) | |
tree | 9caf1aa69dc8e4497d446281ee279565a9afc140 | |
parent | e7886aa9b4dbd436708dfb21a79f19e7b1f2c02c (diff) |
protect against 'use after free' or race condition
-rw-r--r-- | lib/hostip.c | 1 |
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; } |