Skip to content

Commit 74169f4

Browse files
committed
Fix double-free of she2 in she_test
1 parent b573823 commit 74169f4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57626,6 +57626,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
5762657626
ret = wc_SHE_Init(she2, HEAP_HINT, devId);
5762757627
if (ret != 0) {
5762857628
WC_FREE_VAR(she2, HEAP_HINT);
57629+
she2 = NULL;
5762957630
goto exit_SHE_Test;
5763057631
}
5763157632

@@ -57639,6 +57640,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
5763957640
if (ret != 0) {
5764057641
wc_SHE_Free(she2);
5764157642
WC_FREE_VAR(she2, HEAP_HINT);
57643+
she2 = NULL;
5764257644
goto exit_SHE_Test;
5764357645
}
5764457646

@@ -57652,6 +57654,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
5765257654

5765357655
wc_SHE_Free(she2);
5765457656
WC_FREE_VAR(she2, HEAP_HINT);
57657+
she2 = NULL;
5765557658

5765657659
if (ret != 0) {
5765757660
goto exit_SHE_Test;

0 commit comments

Comments
 (0)