소스 검색

fit_image: Fix a double close() on the error path

There is an extra close() call which is not needed.

Reported-by: Coverity (CID: 143065)
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 9 년 전
부모
커밋
4c1dc1a90f
1개의 변경된 파일0개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      tools/fit_image.c

+ 0 - 1
tools/fit_image.c

@@ -343,7 +343,6 @@ static int fit_build(struct image_tool_params *params, const char *fname)
 	if (ret != size) {
 		fprintf(stderr, "%s: Can't write %s: %s\n",
 			params->cmdname, fname, strerror(errno));
-		close(fd);
 		goto err;
 	}
 	close(fd);