Merge pull request #10283 from night1rider/SHE-test-double-free-fix

Fix double-free of she2 in she_test()
This commit is contained in:
JacobBarthelmeh
2026-04-23 16:59:52 -06:00
committed by GitHub
+9
View File
@@ -57861,6 +57861,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
ret = wc_SHE_Init(she2, HEAP_HINT, devId);
if (ret != 0) {
WC_FREE_VAR(she2, HEAP_HINT);
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
she2 = NULL;
#endif
goto exit_SHE_Test;
}
@@ -57874,6 +57877,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
if (ret != 0) {
wc_SHE_Free(she2);
WC_FREE_VAR(she2, HEAP_HINT);
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
she2 = NULL;
#endif
goto exit_SHE_Test;
}
@@ -57887,6 +57893,9 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t she_test(void)
wc_SHE_Free(she2);
WC_FREE_VAR(she2, HEAP_HINT);
#ifdef WC_DECLARE_VAR_IS_HEAP_ALLOC
she2 = NULL;
#endif
if (ret != 0) {
goto exit_SHE_Test;