[U-Boot] [PATCH 01/14] mkimage: Fix munmap() call when importing data

Simon Glass sjg at chromium.org
Wed Mar 16 14:45:31 CET 2016


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 at chromium.org>
---

 tools/fit_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/fit_image.c b/tools/fit_image.c
index 3ecc88f..2c8d92f 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 */
-- 
2.7.0.rc3.207.g0ac5344



More information about the U-Boot mailing list