summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-08-04 15:48:02 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-08-04 15:48:02 +0000
commitbc0da980ba5fe08930b51b729fd41bc36a5510f6 (patch)
tree2688ba5072db018c1a7d4550f2c4600c17c1ec96 /lib
parent8ffa92dd2bfbed46a8fb2ea394d810a8b8217f30 (diff)
Free the SSL context first and let the reference counting do its thing.
Diffstat (limited to 'lib')
-rw-r--r--lib/libressl/ressl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libressl/ressl.c b/lib/libressl/ressl.c
index bc257bd1a87..c4a1e42dfaf 100644
--- a/lib/libressl/ressl.c
+++ b/lib/libressl/ressl.c
@@ -102,11 +102,8 @@ ressl_free(struct ressl *ctx)
void
ressl_reset(struct ressl *ctx)
{
- /* SSL_free frees the SSL context. */
- if (ctx->ssl_conn != NULL)
- SSL_free(ctx->ssl_conn);
- else
- SSL_CTX_free(ctx->ssl_ctx);
+ SSL_CTX_free(ctx->ssl_ctx);
+ SSL_free(ctx->ssl_conn);
ctx->ssl_conn = NULL;
ctx->ssl_ctx = NULL;