From: Maks Mishin Date: Sun, 2 Feb 2025 17:10:39 +0000 (+0300) Subject: tools: imx8mimage: Fix potential memory leak X-Git-Tag: v2025.07-rc1~18^2~75^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=959f3316592b5f272ccd36be00a860856dc5da5b;p=pandora-u-boot.git tools: imx8mimage: Fix potential memory leak Dynamic memory, referenced by 'line', is allocated at imx8mimage.c:187 by calling function 'getline' and lost at imx8mimage.c:210. Signed-off-by: Maks Mishin --- diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index d60d293e649..0f24ba75c0f 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -206,6 +206,7 @@ static uint32_t parse_cfg_file(char *name) } } + free(line); fclose(fd); return 0; }