Skip to content

Commit 4c93155

Browse files
authored
Merge pull request #88 from bigbrett/quickfix-SHE-leak
Fix memory leak in SHE tests
2 parents ba12f79 + 45669e9 commit 4c93155

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949
- name: Build and test ASAN DEBUG
5050
run: cd test && make clean && make DEBUG=1 ASAN=1 WOLFSSL_DIR=../wolfssl run
5151

52-
# Build and test debug build with SHE
53-
- name: Build and test SHE
54-
run: cd test && make clean && make SHE=1 WOLFSSL_DIR=../wolfssl run
52+
# Build and test with SHE and ASAN
53+
- name: Build and test ASAN SHE
54+
run: cd test && make clean && make SHE=1 ASAN=1 WOLFSSL_DIR=../wolfssl run

ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# wolfHSM Release v1.1.0 (January 22, 2025)
1+
# wolfHSM Release v1.1.0 (January 23, 2025)
22
Due to NDA restrictions, access to the Infineon and ST Micro ports is limited. Please contact support@wolfssl.com for access.
33

44
## New Feature Additions
@@ -8,6 +8,7 @@ Due to NDA restrictions, access to the Infineon and ST Micro ports is limited. P
88
## Bug Fixes
99
* Fixes memory error in ECC verify (PR#81)
1010
* Removes unused argument warnings on 32 bit targets (PR#82)
11+
* Fixes memory leak in SHE test (PR#88)
1112

1213
## Enhancements and Optimizations
1314
* Improved handling of Curve25519 DER encoded keys using new wolfCrypt APIs (PR#83)

test/wh_test_she.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ int whTest_SheClientConfig(whClientConfig* config)
178178
WH_ERROR_PRINT("Failed to wc_RNG_GenerateBlock %d\n", ret);
179179
goto exit;
180180
}
181+
/* Done generating test data, free RNG */
182+
wc_FreeRng(rng);
181183
/* cmac 0..0 | size | bootloader */
182184
if ((ret = wc_InitCmac(cmac, key, sizeof(key), WC_CMAC_AES, NULL)) != 0) {
183185
WH_ERROR_PRINT("Failed to wc_InitCmac %d\n", ret);

0 commit comments

Comments
 (0)