summaryrefslogtreecommitdiff
path: root/tools/patch-image
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 07:45:24 +0100
commit8d53e3721cce621d687843595b30ac5f46ae00cf (patch)
treedee4040c1b24fd5ab81db8614bde7bc10b5d3472 /tools/patch-image
parentc186a48fcad6d84c7a1ef010e047d16255529663 (diff)
downloadmtk-20170518-8d53e3721cce621d687843595b30ac5f46ae00cf.zip
mtk-20170518-8d53e3721cce621d687843595b30ac5f46ae00cf.tar.gz
mtk-20170518-8d53e3721cce621d687843595b30ac5f46ae00cf.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/patch-image')
-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;