]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fit_image: Fix a double close() on the error path
authorSimon Glass <sjg@chromium.org>
Sun, 1 May 2016 23:12:24 +0000 (17:12 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 2 May 2016 22:37:10 +0000 (18:37 -0400)
There is an extra close() call which is not needed.

Reported-by: Coverity (CID: 143065)
Signed-off-by: Simon Glass <sjg@chromium.org>
tools/fit_image.c

index ddefa72f3479ffacf746d9b5d46a3b017b92937a..0551572b04576971d4fd4af4e9085b89d5715964 100644 (file)
@@ -343,7 +343,6 @@ static int fit_build(struct image_tool_params *params, const char *fname)
        if (ret != size) {
                fprintf(stderr, "%s: Can't write %s: %s\n",
                        params->cmdname, fname, strerror(errno));
-               close(fd);
                goto err;
        }
        close(fd);