summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-03-16 07:45:31 -0600
committerTom Rini <trini@konsulko.com>2016-03-22 12:16:17 -0400
commit9cff2d1e39bca4e456a61a3395611cafe2f8969e (patch)
treede25c2ec6e7ee2a9515618ecd0377671a18d4b6c
parenta6f70a3d1456e6ce97e0f00ac2d5ff8ae22027d6 (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>
-rw-r--r--tools/fit_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c
index 3ecc88fb56..2c8d92f88d 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 */