summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-03-16 07:45:40 -0600
committerTom Rini <trini@konsulko.com>2016-03-22 12:16:21 -0400
commit21c2975a9421c55938274a542976bc8d3746c1e3 (patch)
tree1bcb92b1f415df7e0a1d339dfbdb8e89f8916430 /tools
parentb97d71e26a0c348d49e83eca9548d8cfe2da07ec (diff)
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 <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/fit_image.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/fit_image.c b/tools/fit_image.c
index bfb43b2e59f..e628212208c 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;
}