aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/conncache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/conncache.c b/lib/conncache.c
index 5c3957519..c712ed7b9 100644
--- a/lib/conncache.c
+++ b/lib/conncache.c
@@ -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);