free enc and dec before returning MEMORY_E

This commit is contained in:
Ruby Martin
2026-03-09 13:03:54 -06:00
parent ba39aacf20
commit 66caf5ad55
+4 -1
View File
@@ -28242,8 +28242,11 @@ static wc_test_ret_t openssl_aes_test(void)
int num = 0;
#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)
if ((enc == NULL) || (dec == NULL))
if ((enc == NULL) || (dec == NULL)) {
XFREE(enc, HEAP_HINT, DYNAMIC_TYPE_AES);
XFREE(dec, HEAP_HINT, DYNAMIC_TYPE_AES);
return MEMORY_E;
}
#endif
XMEMCPY(iv, setIv, sizeof(setIv));