Skip to content

Commit

Permalink
Fix memory leak in SSL_CTX_use_certificate
Browse files Browse the repository at this point in the history
Commit 98bfeeb introduced a memory leak in SSL_CTX_use_certificate by
removing the "if(x509) { ... }" bit while not changing the
"else if(x) {}" right after to an "if(x) {}".

Signed-off-by: Steffan Karger <[email protected]>
Acked-by: Arne Schwabe <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Gert Doering <[email protected]>
  • Loading branch information
syzzer authored and cron2 committed Sep 27, 2018
1 parent 03c8bfc commit 5544f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openvpn/ssl_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ tls_ctx_load_cert_file(struct tls_root_ctx *ctx, const char *cert_file,
{
BIO_free(in);
}
else if (x)
if (x)
{
X509_free(x);
}
Expand Down

0 comments on commit 5544f47

Please sign in to comment.