summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFurong Xu <xfr@outlook.com>2017-02-14 21:25:01 +0800
committerJohn Crispin <john@phrozen.org>2017-02-15 09:37:15 +0100
commiteea6df8255bdf7d64124140bd1f138af3c9ed2ee (patch)
treef1c936d5a61e566ebc2381e78c5ab76ac0d31570 /tools
parent30a4966053562dd252a302c831e780cce8bbdec6 (diff)
downloadmtk-20170518-eea6df8255bdf7d64124140bd1f138af3c9ed2ee.zip
mtk-20170518-eea6df8255bdf7d64124140bd1f138af3c9ed2ee.tar.gz
mtk-20170518-eea6df8255bdf7d64124140bd1f138af3c9ed2ee.tar.bz2
tools: patch-image: fix file descriptor leak.
Maybe this is committed by mistake, fix it. Signed-off-by: Furong Xu <xfr@outlook.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/patch-image/src/patch-dtb.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/tools/patch-image/src/patch-dtb.c b/tools/patch-image/src/patch-dtb.c
index 8d18623..a94da3f 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;