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:
384293e
)
tools: imximage: Fix potential memory leak
author
Maks Mishin
<maks.mishinfz@gmail.com>
Fri, 31 Jan 2025 10:04:46 +0000
(13:04 +0300)
committer
Fabio Estevam
<festevam@gmail.com>
Thu, 27 Feb 2025 12:53:10 +0000
(09:53 -0300)
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>
tools/imximage.c
patch
|
blob
|
history
diff --git
a/tools/imximage.c
b/tools/imximage.c
index
467d9f2
..
55231ca
100644
(file)
--- 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 */