From: Furong Xu Date: Tue, 14 Feb 2017 13:25:01 +0000 (+0800) Subject: tools: patch-image: fix file descriptor leak. X-Git-Tag: v17.01.0~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eea6df8255bdf7d64124140bd1f138af3c9ed2ee;p=oweals%2Fopenwrt.git tools: patch-image: fix file descriptor leak. Maybe this is committed by mistake, fix it. Signed-off-by: Furong Xu --- diff --git a/tools/patch-image/src/patch-dtb.c b/tools/patch-image/src/patch-dtb.c index 8d186236c1..a94da3fa41 100644 --- a/tools/patch-image/src/patch-dtb.c +++ b/tools/patch-image/src/patch-dtb.c @@ -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;