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 8d186236c14531fc9f7873984568200d61a48840..a94da3fa41577c398e1d3262fe4041cf94c8c48a 100644 (file)
@@ -49,10 +49,6 @@ int main(int argc, char **argv)
                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;