diff options
author | jsing <> | 2014-08-04 15:48:01 +0000 |
---|---|---|
committer | jsing <> | 2014-08-04 15:48:01 +0000 |
commit | e7949b694118c6ab2a25de9d86c20ee4f8add4c0 (patch) | |
tree | a0572f2970423e50e68684aad4c752e6a4979c29 /src | |
parent | bba902541ea9e12e8f760f500c6051eed7602dc0 (diff) | |
download | openbsd-e7949b694118c6ab2a25de9d86c20ee4f8add4c0.tar.gz openbsd-e7949b694118c6ab2a25de9d86c20ee4f8add4c0.tar.bz2 openbsd-e7949b694118c6ab2a25de9d86c20ee4f8add4c0.zip |
Free the SSL context first and let the reference counting do its thing.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libressl/ressl.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) | |||
102 | void | 102 | void |
103 | ressl_reset(struct ressl *ctx) | 103 | ressl_reset(struct ressl *ctx) |
104 | { | 104 | { |
105 | /* SSL_free frees the SSL context. */ | 105 | SSL_CTX_free(ctx->ssl_ctx); |
106 | if (ctx->ssl_conn != NULL) | 106 | SSL_free(ctx->ssl_conn); |
107 | SSL_free(ctx->ssl_conn); | ||
108 | else | ||
109 | SSL_CTX_free(ctx->ssl_ctx); | ||
110 | 107 | ||
111 | ctx->ssl_conn = NULL; | 108 | ctx->ssl_conn = NULL; |
112 | ctx->ssl_ctx = NULL; | 109 | ctx->ssl_ctx = NULL; |