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 <[email protected]>
---
 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


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to