From: Mikhail Ilin Date: Wed, 23 Nov 2022 10:59:49 +0000 (+0300) Subject: tools: imx8image: Fix handle leak X-Git-Tag: baikal/mips/sdk5.8.2~5^2~65^2~62 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=2f320e7e654131a842ff15c1ac93efe544be3da9;p=uboot.git 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: e39bfc04356a ("tools: add i.MX8/8X image support") Signed-off-by: Mikhail Ilin Reviewed-by: Simon Glass --- 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; }