[PATCH 25/30] efi: don't zero executable buffer before freeing

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Nov 22 00:47:27 PST 2021


For security, it sometimes makes sense to zero memory before freeing.
This is not the case here, so remove the memset.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/efi/payload/image.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/efi/payload/image.c b/common/efi/payload/image.c
index 3bcb8fce2df5..c1206cd6e211 100644
--- a/common/efi/payload/image.c
+++ b/common/efi/payload/image.c
@@ -106,7 +106,6 @@ static int efi_load_image(const char *file, efi_loaded_image_t **loaded_image,
 
 	*h = handle;
 out:
-	memset(exe, 0, size);
 	free(exe);
 	return -efi_errno(efiret);
 }
-- 
2.30.2




More information about the barebox mailing list