Revert "Allow compiling aes.c with WOLFSSL_NO_MALLOC"

This reverts commit 56a96ba609.
This commit is contained in:
Daniel Pouzzner
2024-10-11 13:04:30 -05:00
parent ee92f38f88
commit dc2a8118de

View File

@ -11299,7 +11299,6 @@ int wc_AesCcmEncrypt_ex(Aes* aes, byte* out, const byte* in, word32 sz,
#endif /* HAVE_AESCCM */ #endif /* HAVE_AESCCM */
#ifndef WOLFSSL_NO_MALLOC
Aes* wc_AesNew(void* heap, int devId) Aes* wc_AesNew(void* heap, int devId)
{ {
Aes* aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_AES); Aes* aes = (Aes*)XMALLOC(sizeof(Aes), heap, DYNAMIC_TYPE_AES);
@ -11314,7 +11313,6 @@ Aes* wc_AesNew(void* heap, int devId)
} }
return aes; return aes;
} }
#endif
/* Initialize Aes for use with async hardware */ /* Initialize Aes for use with async hardware */
int wc_AesInit(Aes* aes, void* heap, int devId) int wc_AesInit(Aes* aes, void* heap, int devId)
@ -11527,11 +11525,9 @@ void wc_AesFree(Aes* aes)
wc_MemZero_Check(aes, sizeof(Aes)); wc_MemZero_Check(aes, sizeof(Aes));
#endif #endif
#ifndef WOLFSSL_NO_MALLOC
if (isAllocated) { if (isAllocated) {
XFREE(aes, heap, DYNAMIC_TYPE_AES); XFREE(aes, heap, DYNAMIC_TYPE_AES);
} }
#endif
} }