mirror of
https://github.com/curl/curl.git
synced 2026-04-17 20:31:42 +03:00
conncache: fixed memory leak on OOM (torture tests)
This commit is contained in:
parent
28cdc0d82c
commit
b6e3da5f08
1 changed files with 3 additions and 1 deletions
|
|
@ -205,8 +205,10 @@ CURLcode Curl_conncache_add_conn(struct conncache *connc,
|
|||
return result;
|
||||
|
||||
key = hashkey(conn);
|
||||
if(!key)
|
||||
if(!key) {
|
||||
bundle_destroy(new_bundle);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
rc = conncache_add_bundle(data->state.conn_cache, key, new_bundle);
|
||||
free(key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue