From: Furong Xu Date: Tue, 14 Feb 2017 13:25:01 +0000 (+0800) Subject: tools: patch-image: fix file descriptor leak. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eea6df8255bdf7d64124140bd1f138af3c9ed2ee;p=openwrt%2Fstaging%2Frmilecki.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 8d186236c14..a94da3fa415 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;