crypto_lite模块内存泄漏问题修复

Signed-off-by: 王静 <wangjing561@huawei.com>
This commit is contained in:
王静 2024-10-18 09:54:31 +08:00
parent 6e01153baa
commit d6b1ed70f9

View File

@ -162,6 +162,8 @@ static int32_t RsaLoadPrivateKey(mbedtls_pk_context *pk, const unsigned char *ke
mbedtls_rsa_set_padding(rsa, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256);
(void)memset_s(finalKey, finalKeyLen, 0, finalKeyLen);
free(finalKey);
mbedtls_ctr_drbg_free(&ctrDrbg);
mbedtls_entropy_free(&entropy);
return ERROR_SUCCESS;
} while (0);