From: Simon Glass Date: Wed, 16 Mar 2016 13:45:38 +0000 (-0600) Subject: mkimage: Add a missing free() to fit_import_data() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6e0ffce6cb50beb2fdf2cb0112cb359a7dede723;p=project%2Fbcm63xx%2Fu-boot.git mkimage: Add a missing free() to fit_import_data() The space allocated to fdt is not freed on error. Fix it. Reported-by: Coverity (CID: 138494) Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- diff --git a/tools/fit_image.c b/tools/fit_image.c index 8a93ea33f9..8d58370d87 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -541,6 +541,7 @@ static int fit_import_data(struct image_tool_params *params, const char *fname) ret = 0; err: + free(fdt); close(fd); return ret; }