mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
openssl: fix memory leak in servercert
... when failing to get the server certificate.
This commit is contained in:
parent
7c145bb2a0
commit
da2af5c04d
@ -2819,6 +2819,7 @@ static CURLcode servercert(struct connectdata *conn,
|
||||
|
||||
connssl->server_cert = SSL_get_peer_certificate(connssl->handle);
|
||||
if(!connssl->server_cert) {
|
||||
BIO_free(mem);
|
||||
if(!strict)
|
||||
return CURLE_OK;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user