diff options
| author | Maks Mishin <maks.mishinfz@gmail.com> | 2025-01-31 13:04:46 +0300 |
|---|---|---|
| committer | Fabio Estevam <festevam@gmail.com> | 2025-02-27 09:53:10 -0300 |
| commit | 205bf9763208c8b94cdd4c723253d230f5a5866b (patch) | |
| tree | fdc0172ee59a1c000505afbea2b83bf60f2be357 /tools/imximage.c | |
| parent | 384293e82076a4318a478025beb37f71ab8c487b (diff) | |
tools: imximage: Fix potential memory leak
Dynamic memory, referenced by 'line', is allocated at imximage.c:761
by calling function 'getline' and lost at imximage.c:793.
Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
Diffstat (limited to 'tools/imximage.c')
| -rw-r--r-- | tools/imximage.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/imximage.c b/tools/imximage.c index 467d9f27d2a..55231caf8f3 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -783,6 +783,7 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name) } (*set_dcd_rst)(imxhdr, dcd_len, name, lineno); + free(line); fclose(fd); /* Exit if there is no BOOT_FROM field specifying the flash_offset */ |
