diff options
author | jkim <jkim@FreeBSD.org> | 2016-05-03 18:50:10 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2016-05-03 18:50:10 +0000 |
commit | 00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced (patch) | |
tree | 64905eaaef6c163463b7acbaca1a9724913735f5 /crypto/openssl/crypto/evp/digest.c | |
parent | c052df1347dcbd00de507acf0cfa03733e795db5 (diff) | |
parent | acb827e3083196de4c00b67ac9ae3bf860ffd4a9 (diff) | |
download | FreeBSD-src-00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced.zip FreeBSD-src-00a878d06ed0d3bdfbf6339ef29f6cc94fd47ced.tar.gz |
Merge OpenSSL 1.0.2h.
Relnotes: yes
Diffstat (limited to 'crypto/openssl/crypto/evp/digest.c')
-rw-r--r-- | crypto/openssl/crypto/evp/digest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/openssl/crypto/evp/digest.c b/crypto/openssl/crypto/evp/digest.c index f2643f3..5b642b2 100644 --- a/crypto/openssl/crypto/evp/digest.c +++ b/crypto/openssl/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; |