[source] tools: patch-image: fix file descriptor leak.
LEDE Commits
lede-commits at lists.infradead.org
Tue Feb 14 22:52:33 PST 2017
blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/8d53e3721cce621d687843595b30ac5f46ae00cf
commit 8d53e3721cce621d687843595b30ac5f46ae00cf
Author: Furong Xu <xfr at outlook.com>
AuthorDate: Tue Feb 14 21:25:01 2017 +0800
tools: patch-image: fix file descriptor leak.
Maybe this is committed by mistake, fix it.
Signed-off-by: Furong Xu <xfr at outlook.com>
---
tools/patch-image/src/patch-dtb.c | 4 ----
1 file changed, 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;
More information about the lede-commits
mailing list