[PATCH v2 25/29] scripts: imx-image: add missing close()

Marco Felsch m.felsch at pengutronix.de
Tue Oct 17 07:51:27 PDT 2023


Close the csfbin file after we read it into buf.

Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
---
Changelog:
v2:
- unchaned
- v1-link: https://lore.barebox.org/barebox/20231010143314.2031253-1-m.felsch@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




More information about the barebox mailing list