From 690f32e905567843e1fe02b180d57fce0aaa8b71 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 4 Aug 2014 15:48:01 +0000 Subject: Free the SSL context first and let the reference counting do its thing. --- src/lib/libressl/ressl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libressl/ressl.c b/src/lib/libressl/ressl.c index bc257bd1a8..c4a1e42dfa 100644 --- a/src/lib/libressl/ressl.c +++ b/src/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; -- cgit v1.2.3-55-g6feb