openssl: fix memory leak in servercert

... when failing to get the server certificate.
This commit is contained in:
Daniel Stenberg 2017-04-20 15:46:03 +02:00
parent 7c145bb2a0
commit da2af5c04d

View File

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