mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:03:31 +03:00
multi: free sockhash on OOM
This would otherwise leak memory in the error path. Detected by torture test 1540. Closes #4713
This commit is contained in:
parent
38ad9ea1b8
commit
29ca9fc596
1 changed files with 1 additions and 0 deletions
|
|
@ -260,6 +260,7 @@ static struct Curl_sh_entry *sh_addentry(struct curl_hash *sh,
|
|||
|
||||
/* make/add new hash entry */
|
||||
if(!Curl_hash_add(sh, (char *)&s, sizeof(curl_socket_t), check)) {
|
||||
Curl_hash_destroy(&check->transfers);
|
||||
free(check);
|
||||
return NULL; /* major failure */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue