Эх сурвалжийг харах

mkimage: Correct file being closed twice in fit_extract_data()

The code flows through to the end of the function, so we don't need another
close() before this. Remove it.

Reported-by: Coverity (CID: 138503)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass 9 жил өмнө
parent
commit
f980ca3411
1 өөрчлөгдсөн 0 нэмэгдсэн , 2 устгасан
  1. 0 2
      tools/fit_image.c

+ 0 - 2
tools/fit_image.c

@@ -446,8 +446,6 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
 		ret = -EIO;
 		goto err;
 	}
-	close(fd);
-
 	ret = 0;
 
 err: