tools: patch-image: fix file descriptor leak.
authorFurong Xu <xfr@outlook.com>
Tue, 14 Feb 2017 13:25:01 +0000 (21:25 +0800)
committerJohn Crispin <john@phrozen.org>
Wed, 15 Feb 2017 06:45:24 +0000 (07:45 +0100)
Maybe this is committed by mistake, fix it.

Signed-off-by: Furong Xu <xfr@outlook.com>
tools/patch-image/src/patch-dtb.c

index 8d18623..a94da3f 100644 (file)
@@ -49,10 +49,6 @@ int main(int argc, char **argv)
                search_space = dtb_max_size = atoi(argv[3]);
        }
 
                search_space = dtb_max_size = atoi(argv[3]);
        }
 
-       fddtb = open(argv[1], O_RDONLY);
-       if (!fddtb)
-               goto err1;
-
        if (stat(argv[2], &s)) {
                fprintf(stderr, "DTB not found\n");
                goto err1;
        if (stat(argv[2], &s)) {
                fprintf(stderr, "DTB not found\n");
                goto err1;