mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
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:
parent
de3281a3a8
commit
14597475b1
3 changed files with 24 additions and 18 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue