summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMikhail Ilin <ilin.mikhail.ol@gmail.com>2022-11-23 13:59:49 +0300
committerStefano Babic <sbabic@denx.de>2023-01-31 01:23:01 +0300
commitf75e92f7f7bffe724dccd6769b37f95e0aa7842c (patch)
tree39a0f54b3000d96e3e6a7b089103ba461f476ed6 /tools
parent9017785acd247c6ba60d0f0c0e9722201f0b184c (diff)
downloadu-boot-f75e92f7f7bffe724dccd6769b37f95e0aa7842c.tar.xz
tools: imx8image: Fix handle leak
The handle "fd" was created in imx8image.c:249 by calling the "fopen" function and is lost in imx8image.c:282. Should close the 'fd' file descriptor before exiting the parse_cfg_file(image_t *param_stack, char *name) function. Fixes: a2b96ece5be1 ("tools: add i.MX8/8X image support") Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/imx8image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/imx8image.c b/tools/imx8image.c
index 01e1486911..395d5c64bd 100644
--- a/tools/imx8image.c
+++ b/tools/imx8image.c
@@ -279,6 +279,7 @@ static uint32_t parse_cfg_file(image_t *param_stack, char *name)
}
}
+ fclose(fd);
return 0;
}