Close the csfbin file after we read it into buf. Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx> --- 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