aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-04-20 15:46:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-04-20 15:46:03 +0200
commitda2af5c04dee9d0e16c02b468494f386ac69e837 (patch)
tree9a17250ba3e7ac7a795fe2ab88526ecc52e86b34 /lib/vtls
parent7c145bb2a0a6c176ffdd65421a40026bcae07375 (diff)
openssl: fix memory leak in servercert
... when failing to get the server certificate.
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/openssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 58a014a4d..52ebe671a 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -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;