소스 검색

tools: patch-image: fix file descriptor leak.

Maybe this is committed by mistake, fix it.

Signed-off-by: Furong Xu <[email protected]>
Furong Xu 8 년 전
부모
커밋
8d53e3721c
1개의 변경된 파일0개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 4
      tools/patch-image/src/patch-dtb.c

+ 0 - 4
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;