]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
tools: imx8mimage: Fix potential memory leak
authorMaks Mishin <maks.mishinfz@gmail.com>
Sun, 2 Feb 2025 17:10:39 +0000 (20:10 +0300)
committerFabio Estevam <festevam@gmail.com>
Thu, 27 Feb 2025 12:53:45 +0000 (09:53 -0300)
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 <maks.mishinFZ@gmail.com>
tools/imx8mimage.c

index d60d293e649beba2d528b04de5d303da84fadaf8..0f24ba75c0fb318d658b6abac6990a64b07b79a8 100644 (file)
@@ -206,6 +206,7 @@ static uint32_t parse_cfg_file(char *name)
                }
        }
 
+       free(line);
        fclose(fd);
        return 0;
 }