mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-07 09:30:48 +02:00
free enc and dec before returning MEMORY_E
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user