]> git.baikalelectronics.ru Git - uboot.git/commit
mkimage: fit: Unmmap the memory before closing fd in fit_import_data()
authorLihua Zhao <lihua.zhao@windriver.com>
Sat, 18 Apr 2020 08:59:10 +0000 (01:59 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 14:51:56 +0000 (10:51 -0400)
commit1d7d19f1924475d108d4432640cd94915775fcf7
treeee7edd630917ca017fd28223fe4013bfded6d228
parentb5ea1414dd6c3c10d52705301d7295082e12fd85
mkimage: fit: Unmmap the memory before closing fd in fit_import_data()

Without calling munmap(), the follow-up call to open() the same file
with a flag O_TRUNC seems not to cause any issue on Linux, but it fails
on Windows with error like below:

    Can't open kernel_fdt.itb.tmp: Permission denied

Fix this by unmapping the memory before closing fd in fit_import_data().

Signed-off-by: Lihua Zhao <lihua.zhao@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
tools/fit_image.c