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>
This commit is contained in:

committed by
Fabio Estevam

parent
384293e820
commit
205bf97632
@@ -783,6 +783,7 @@ static uint32_t parse_cfg_file(struct imx_header *imxhdr, char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
(*set_dcd_rst)(imxhdr, dcd_len, name, lineno);
|
(*set_dcd_rst)(imxhdr, dcd_len, name, lineno);
|
||||||
|
free(line);
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
|
|
||||||
/* Exit if there is no BOOT_FROM field specifying the flash_offset */
|
/* Exit if there is no BOOT_FROM field specifying the flash_offset */
|
||||||
|
Reference in New Issue
Block a user