mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-28 07:03:31 +08:00
mkimage: fit: Free buf directly in fit_extract_data()
If given ptr to free() is NULL, no operation is performed. Hence we can just free buf directly in fit_extract_data(). Signed-off-by: Bin Meng <bin.meng@windriver.com>
This commit is contained in:
parent
3fc85a782a
commit
0dbd6e3698
@ -534,7 +534,6 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
|
|||||||
err_munmap:
|
err_munmap:
|
||||||
munmap(fdt, sbuf.st_size);
|
munmap(fdt, sbuf.st_size);
|
||||||
err:
|
err:
|
||||||
if (buf)
|
|
||||||
free(buf);
|
free(buf);
|
||||||
close(fd);
|
close(fd);
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user