tools: imx8mimage: Fix handle leak
PATCH 1/1 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 6609c2663c9c ("tools: add i.MX8M image support")
Signed-off-by Mikhail Ilin <[email protected]>
--- tools/imx8mimage.c | 1 + 1 file changed, 1 insertion(+)
tools/imx8mimage.c +1 -0
@@ -207,6 +207,7 @@ static uint32_t parse_cfg_file(char *name) } } +fclose (fd);return 0 ; }
Signature · 1 line
2.17.1
PATCH 1/1 tools: imx8mimage: Fix handle leak
Quoted 6 lines
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 theparse_cfg_file(char *name)function.Fixes 6609c2663c9c ("tools: add i.MX8M image support")Signed-off-by Mikhail Ilin <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================