[source] tools: patch-image: fix file descriptor leak.
LEDE Commits
lede-commits at lists.infradead.org
Wed Feb 15 00:37:20 PST 2017
blogic pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/eea6df8255bdf7d64124140bd1f138af3c9ed2ee
commit eea6df8255bdf7d64124140bd1f138af3c9ed2ee
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