diff options
| author | jsing <> | 2014-08-04 15:48:01 +0000 |
|---|---|---|
| committer | jsing <> | 2014-08-04 15:48:01 +0000 |
| commit | 690f32e905567843e1fe02b180d57fce0aaa8b71 (patch) | |
| tree | a0572f2970423e50e68684aad4c752e6a4979c29 | |
| parent | c135325340b9f60bca34fe59b4bc77913da68f5a (diff) | |
| download | openbsd-690f32e905567843e1fe02b180d57fce0aaa8b71.tar.gz openbsd-690f32e905567843e1fe02b180d57fce0aaa8b71.tar.bz2 openbsd-690f32e905567843e1fe02b180d57fce0aaa8b71.zip | |
Free the SSL context first and let the reference counting do its thing.
Diffstat (limited to '')
| -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; |
