public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] tools: imx8mimage: Fix handle leak
@ 2022-11-23 10:48 Mikhail Ilin
  2023-01-31  9:50 ` sbabic
  0 siblings, 1 reply; 2+ messages in thread
From: Mikhail Ilin @ 2022-11-23 10:48 UTC (permalink / raw)
  To: u-boot; +Cc: Mikhail Ilin

 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 <ilin.mikhail.ol@gmail.com>
---
 tools/imx8mimage.c | 1 +
 1 file changed, 1 insertion(+)

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;
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-31  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-23 10:48 [PATCH] tools: imx8mimage: Fix handle leak Mikhail Ilin
2023-01-31  9:50 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox