git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25c0364
)
tools: ublimage: Fix memory leak in parse_cfg_file()
author
Maks Mishin
<maks.mishinfz@gmail.com>
Sun, 2 Feb 2025 17:05:42 +0000
(20:05 +0300)
committer
Tom Rini
<trini@konsulko.com>
Tue, 11 Feb 2025 14:17:22 +0000
(08:17 -0600)
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>
tools/ublimage.c
patch
|
blob
|
history
diff --git
a/tools/ublimage.c
b/tools/ublimage.c
index
8f9b58c
..
a1bd807
100644
(file)
--- 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;