From 03b5cf55183f589ef1bc32e208b26304802e7af7 Mon Sep 17 00:00:00 2001 From: Alami-Amine Date: Thu, 7 Nov 2024 12:27:44 +0100 Subject: [PATCH] Integrating comments --- src/crypto/CHIPCryptoPALOpenSSL.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index 4f908467a15f57..a3a181b8b024ec 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -449,10 +449,9 @@ static inline EVP_MD_CTX * to_inner_hash_evp_md_ctx(HashSHA256OpaqueContext * co return *SafePointerCast(context); } -Hash_SHA256_stream::Hash_SHA256_stream() +Hash_SHA256_stream::Hash_SHA256_stream() : mInitialized(false) { set_inner_hash_evp_md_ctx(&mContext, nullptr); - mInitialized = false; } Hash_SHA256_stream::~Hash_SHA256_stream() @@ -541,8 +540,8 @@ void Hash_SHA256_stream::Clear() { EVP_MD_CTX_free(mdctx); set_inner_hash_evp_md_ctx(&mContext, nullptr); - mInitialized = false; } + mInitialized = false; OPENSSL_cleanse(this, sizeof(*this)); }