From 7e8d9314ff4a271e621a617400b34d1928aa7385 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Thu, 31 Jul 2025 14:23:44 +0200 Subject: [PATCH] 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 --- crypto/mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/mem.c b/crypto/mem.c index 2d0f2c0d4f..7a0e555611 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -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. */