SSL: fix memory leak
In OOM situation. Follow-up fix to commit a9cd4f4ed49e1a0.
This commit is contained in:
parent
a9cd4f4ed4
commit
1238edaeaf
@ -350,8 +350,11 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
|
||||
store->name = clone_host; /* clone host name */
|
||||
store->remote_port = conn->remote_port; /* port number */
|
||||
|
||||
if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config))
|
||||
if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config)) {
|
||||
store->sessionid = NULL; /* let caller free sessionid */
|
||||
free(clone_host);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user