From: Simon Glass Date: Wed, 16 Mar 2016 13:45:31 +0000 (-0600) Subject: mkimage: Fix munmap() call when importing data X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=9cff2d1e39bca4e456a61a3395611cafe2f8969e;p=u-boot.git 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 Reviewed-by: Tom Rini --- 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 */