diff options
author | Simon Glass | 2016-03-16 07:45:31 -0600 |
---|---|---|
committer | Tom Rini | 2016-03-22 12:16:17 -0400 |
commit | 9cff2d1e39bca4e456a61a3395611cafe2f8969e (patch) | |
tree | de25c2ec6e7ee2a9515618ecd0377671a18d4b6c /tools/fit_image.c | |
parent | a6f70a3d1456e6ce97e0f00ac2d5ff8ae22027d6 (diff) |
mkimage: Fix munmap() call when importing data
The munmap() call unmaps the wrong memory buffer. Fix it.
Reported-by: Coverity (CID: 138505)
Reported-by: Coverity (CID: 138495)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/fit_image.c')
-rw-r--r-- | tools/fit_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c index 3ecc88fb565..2c8d92f88da 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -517,7 +517,7 @@ static int fit_import_data(struct image_tool_params *params, const char *fname) } } - munmap(fdt, sbuf.st_size); + munmap(old_fdt, sbuf.st_size); close(fd); /* Pack the FDT and place the data after it */ |