Close the csfbin file after we read it into buf.

Signed-off-by: Marco Felsch <m.fel...@pengutronix.de>
---
Changelog:
v2:
- unchaned
- v1-link: 
https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t

 scripts/imx/imx-image.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 8c4cc771ee28..4a0a44b3a9b3 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -796,6 +796,8 @@ static int hab_sign(struct config_data *data, const char 
*csfcmds,
 
        xread(fd, buf, s.st_size);
 
+       close(fd);
+
        /*
         * For i.MX8M, write into the reserved CSF section
         */
-- 
2.39.2


Reply via email to