diff options
author | Maks Mishin <maks.mishinfz@gmail.com> | 2025-02-02 20:05:42 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-11 08:17:22 -0600 |
commit | 4545880c3c86ff48fc88073f390ccab9cff7c11b (patch) | |
tree | 0d098f7cf4f8dd0e3f47fbd11f2253cbc99ccb40 | |
parent | 25c03648e9faf334d5f97ab8a37b3b199a60fcfb (diff) |
tools: ublimage: Fix memory leak in parse_cfg_file()
Dynamic memory, referenced by 'line', is allocated at ublimage.c:159
by calling function 'getline' and lost at ublimage.c:184.
Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
-rw-r--r-- | tools/ublimage.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/ublimage.c b/tools/ublimage.c index 8f9b58c7983..a1bd807bfa0 100644 --- a/tools/ublimage.c +++ b/tools/ublimage.c @@ -178,6 +178,7 @@ static uint32_t parse_cfg_file(struct ubl_header *ublhdr, char *name) lineno, fld, &dcd_len); } } + free(line); fclose(fd); return dcd_len; |