summaryrefslogtreecommitdiff
path: root/lib/hash.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-10-19 20:17:16 +0000
committerYang Tse <yangsita@gmail.com>2008-10-19 20:17:16 +0000
commit5779283a52a1369cccbe1a1d314e2ec8ac949e0f (patch)
treea3abefd48a641c96e3686bf05c9615adfc80f39e /lib/hash.c
parent80d0dcc9a3124dcecc9d1f7296f2ac429bc7d704 (diff)
downloadcurl-5779283a52a1369cccbe1a1d314e2ec8ac949e0f.tar.gz
attempt to fix or allow further detection of an elusive icc SIGSEGV
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 095fa7028..39c7a079d 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -44,6 +44,7 @@ hash_element_dtor(void *user, void *element)
h->dtor(e->ptr);
+ memset(e, 0, sizeof(struct curl_hash_element));
free(e);
}
@@ -232,6 +233,7 @@ Curl_hash_clean(struct curl_hash *h)
for (i = 0; i < h->slots; ++i) {
Curl_llist_destroy(h->table[i], (void *) h);
+ h->table[i] = NULL;
}
free(h->table);
@@ -269,6 +271,8 @@ Curl_hash_destroy(struct curl_hash *h)
return;
Curl_hash_clean(h);
+
+ memset(h, 0, sizeof(struct struct curl_hash));
free(h);
}