aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-03-15 23:19:50 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-03-16 08:10:30 +0100
commit2eba5e4c7bf28bb5a98a6b1f55ad5fae3b27492c (patch)
treed30192081d6db30d06df52c029ea35a141622d84
parent404d5f200b7281d88d05fccfa006362497878ad4 (diff)
vtls: free ssl_config leftovers on out-of-memory
Torture testing 2034 and 2037 found this. Reported-by: Marc Hörsken Fixes #5108 Closes #5109
-rw-r--r--lib/vtls/vtls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index dfefa1bd5..badd93d08 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -489,6 +489,7 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
store->scheme = conn->handler->scheme;
if(!Curl_clone_primary_ssl_config(ssl_config, &store->ssl_config)) {
+ Curl_free_primary_ssl_config(&store->ssl_config);
store->sessionid = NULL; /* let caller free sessionid */
free(clone_host);
free(clone_conn_to_host);