]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mkimage: Fix missing free() in fit_extract_data()
authorSimon Glass <sjg@chromium.org>
Wed, 16 Mar 2016 13:45:40 +0000 (07:45 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 22 Mar 2016 16:16:21 +0000 (12:16 -0400)
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>
tools/fit_image.c

index bfb43b2e59f693c38f3831ef290b8ebc4138813b..e628212208c4ae417ed8f1ac37f2a6e581cb8365 100644 (file)
@@ -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;
 }