From: Simon Glass Date: Wed, 16 Mar 2016 13:45:40 +0000 (-0600) Subject: mkimage: Fix missing free() in fit_extract_data() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=21c2975a9421c55938274a542976bc8d3746c1e3;p=project%2Fbcm63xx%2Fu-boot.git mkimage: Fix missing free() in fit_extract_data() The 'buf' variable is not freed. Fix it. Reported-by: Coverity (CID: 138492) Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- diff --git a/tools/fit_image.c b/tools/fit_image.c index bfb43b2e59..e628212208 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -452,6 +452,8 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname) err_munmap: munmap(fdt, sbuf.st_size); err: + if (buf) + free(buf); close(fd); return ret; }