crypto/mem.c: simplify OPENSSL_SMALL_FOOTPRINT handling in CRYPTO_aligned_alloc

There is no need to initialise neither *freeptr, as it is initialised
already, nor ret, as NULL can be simply returned instead.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
This commit is contained in:
Eugene Syromiatnikov 2025-07-31 14:23:44 +02:00
parent 295650ae4c
commit 7e8d9314ff
1 changed files with 1 additions and 2 deletions

View File

@ -236,8 +236,7 @@ void *CRYPTO_aligned_alloc(size_t num, size_t alignment, void **freeptr,
*freeptr = NULL;
#if defined(OPENSSL_SMALL_FOOTPRINT)
ret = *freeptr = NULL;
return ret;
return NULL;
#endif
/* Allow non-malloc() allocations as long as no malloc_impl is provided. */