From: Mikhail Ilin Date: Wed, 23 Nov 2022 10:48:44 +0000 (+0300) Subject: tools: imx8mimage: Fix handle leak X-Git-Tag: baikal/mips/sdk5.8.2~5^2~65^2~63 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=cb67eaf42f49bbedadb68104e897956c34f56877;p=uboot.git tools: imx8mimage: Fix handle leak The handle "fd" was created in imx8mimage.c:178 by calling the "fopen" function and is lost in imx8mimage.c:210. Should close the 'fd' file descriptor before exiting the parse_cfg_file(char *name) function. Fixes: e1a587f058cc ("tools: add i.MX8M image support") Signed-off-by: Mikhail Ilin --- diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index 35d0a92bfd..3ca79d865a 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -207,6 +207,7 @@ static uint32_t parse_cfg_file(char *name) } } + fclose(fd); return 0; }