From e5fe3d6bcafce71dfebc26652f17f6c019d67a62 Mon Sep 17 00:00:00 2001 From: hhhFun Date: Sat, 14 Sep 2024 17:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9tdd=E5=86=85=E5=AD=98?= =?UTF-8?q?=E9=87=8A=E6=94=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hhhFun --- test/unittest/src/native/native_asym_key_test.cpp | 1 + test/unittest/src/sm2/crypto_sm2_util_test.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/test/unittest/src/native/native_asym_key_test.cpp b/test/unittest/src/native/native_asym_key_test.cpp index f949d65..af72a94 100644 --- a/test/unittest/src/native/native_asym_key_test.cpp +++ b/test/unittest/src/native/native_asym_key_test.cpp @@ -212,6 +212,7 @@ HWTEST_F(NativeAsymKeyTest, NativeAsymKeyTest005, TestSize.Level0) ASSERT_NE(dataBlob.data, nullptr); ASSERT_NE(dataBlob.len, 0); OH_Crypto_FreeDataBlob(&dataBlob); + OH_Crypto_FreeDataBlob(&retBlob); OH_CryptoAsymKeyGenerator_Destroy(ctx); OH_CryptoKeyPair_Destroy(keyPair); diff --git a/test/unittest/src/sm2/crypto_sm2_util_test.cpp b/test/unittest/src/sm2/crypto_sm2_util_test.cpp index 10dd410..a66a957 100644 --- a/test/unittest/src/sm2/crypto_sm2_util_test.cpp +++ b/test/unittest/src/sm2/crypto_sm2_util_test.cpp @@ -522,6 +522,7 @@ HWTEST_F(CryptoSm2UtilTest, CryptoSm2UtilTest202, TestSize.Level0) res = HcfSm2SpecToAsn1(spec, &output); EXPECT_EQ(res, HCF_SUCCESS); HcfFree(spec); + HcfBlobDataFree(&output); } HWTEST_F(CryptoSm2UtilTest, CryptoSm2UtilTest203, TestSize.Level0) -- Gitee