aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libserver/dkim.c8
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);