diff options
| author | 2014-08-04 15:48:01 +0000 | |
|---|---|---|
| committer | 2014-08-04 15:48:01 +0000 | |
| commit | 8a273387d675009bbcb66a943833ae366fed6611 (patch) | |
| tree | daf53a6df4fe883ce13ccf731a3af0ab3d0e761c | |
| parent | Implement PATH_INFO and add DOCUMENT_ROOT. (diff) | |
| download | wireguard-openbsd-8a273387d675009bbcb66a943833ae366fed6611.tar.xz wireguard-openbsd-8a273387d675009bbcb66a943833ae366fed6611.zip | |
Free the SSL context first and let the reference counting do its thing.
| -rw-r--r-- | lib/libressl/ressl.c | 7 |
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; |
