Jeff Pohlmeyer did some marvelous debugging to track this one down. We MUST

NOT free the existing hash entry when we try to add a new one that matches
an existing entry. We now instead free the new one, and make the parent
function use the old entry's struct instead.
This commit is contained in:
Daniel Stenberg
2003-09-14 21:17:54 +00:00
parent de3281a3a8
commit 14597475b1
3 changed files with 24 additions and 18 deletions

View File

@@ -47,7 +47,7 @@ typedef struct _curl_hash_element {
int Curl_hash_init(curl_hash *, int, curl_hash_dtor);
curl_hash *Curl_hash_alloc(int, curl_hash_dtor);
int Curl_hash_add(curl_hash *, char *, size_t, const void *);
void *Curl_hash_add(curl_hash *, char *, size_t, void *);
int Curl_hash_delete(curl_hash *h, char *key, size_t key_len);
void *Curl_hash_pick(curl_hash *, char *, size_t);
void Curl_hash_apply(curl_hash *h, void *user,