From ab623c923d4e2c950342aec5da371cb92b1fbbc6 Mon Sep 17 00:00:00 2001 From: mrezai Date: Tue, 3 May 2016 23:59:14 +0430 Subject: Update OpenSSL to 1.0.2h --- drivers/builtin_openssl2/crypto/evp/digest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/builtin_openssl2/crypto/evp/digest.c') diff --git a/drivers/builtin_openssl2/crypto/evp/digest.c b/drivers/builtin_openssl2/crypto/evp/digest.c index f2643f3248..5b642b23fc 100644 --- a/drivers/builtin_openssl2/crypto/evp/digest.c +++ b/drivers/builtin_openssl2/crypto/evp/digest.c @@ -212,8 +212,10 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) } #endif if (ctx->digest != type) { - if (ctx->digest && ctx->digest->ctx_size) + if (ctx->digest && ctx->digest->ctx_size) { OPENSSL_free(ctx->md_data); + ctx->md_data = NULL; + } ctx->digest = type; if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) { ctx->update = type->update; -- cgit v1.2.3