Skip to content
Permalink
Browse files

Fix memleak

Found by: michaelortmann
Patch by: michaelortmann
  • Loading branch information...
michaelortmann authored and vanosg committed Jul 26, 2019
1 parent fb62c9f commit 3f1884323610653e1f98b5794f1237b0cafe2deb
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/tls.c
@@ -651,8 +651,10 @@ void ssl_info(SSL *ssl, int where, int ret)
putlog(data->loglevel, "*", "TLS: handshake successful. Secure connection "
"established.");

if ((cert = SSL_get_peer_certificate(ssl)))
if ((cert = SSL_get_peer_certificate(ssl))) {
ssl_showcert(cert, data->loglevel);
X509_free(cert);
}
else
putlog(data->loglevel, "*", "TLS: peer did not present a certificate");

0 comments on commit 3f18843

Please sign in to comment.
You can’t perform that action at this time.