diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-30 09:04:46 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-30 09:04:46 +0100 |
commit | ea4b010734ca734804a0a4520b8b4720db59f10b (patch) | |
tree | 6ddefcb34bb3b19811fed9cb02e18229aa7454f0 | |
parent | c276213f6eebb0176f1be268d285ed1bbffaec30 (diff) | |
download | rspamd-ea4b010734ca734804a0a4520b8b4720db59f10b.tar.gz rspamd-ea4b010734ca734804a0a4520b8b4720db59f10b.zip |
[Minor] Fix EVP cleanup
Issue: #1657
-rw-r--r-- | src/libserver/dkim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index 194784651..311b293f1 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -2198,12 +2198,14 @@ rspamd_dkim_check (rspamd_dkim_context_t *ctx, } } + if (cpy_ctx) { #if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - EVP_MD_CTX_cleanup (cpy_ctx); + EVP_MD_CTX_cleanup (cpy_ctx); #else - EVP_MD_CTX_reset (cpy_ctx); + EVP_MD_CTX_reset (cpy_ctx); #endif - EVP_MD_CTX_destroy (cpy_ctx); + EVP_MD_CTX_destroy (cpy_ctx); + } } dlen = EVP_MD_CTX_size (ctx->common.headers_hash); |