From: Furong Xu Date: Tue, 14 Feb 2017 13:25:01 +0000 (+0800) Subject: tools: patch-image: fix file descriptor leak. X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d53e3721cce621d687843595b30ac5f46ae00cf;p=librecmc%2Flibrecmc.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 8d186236c1..a94da3fa41 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;