1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -05:00

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
This commit is contained in:
Daniel Stenberg 2020-03-15 23:19:50 +01:00
parent 404d5f200b
commit 2eba5e4c7b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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);