mirror of
https://gitee.com/openharmony/security_huks
synced 2024-11-23 14:50:06 +00:00
crypto_lite模块内存泄漏问题修复
Signed-off-by: 王静 <wangjing561@huawei.com>
This commit is contained in:
parent
6e01153baa
commit
d6b1ed70f9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user