mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	tools: imx8image: Fix handle leak
The handle "fd" was created in imx8image.c:249 by calling the "fopen"
 function and is lost in imx8image.c:282.
 Should close the 'fd' file descriptor before exiting the
 parse_cfg_file(image_t *param_stack, char *name) function.
Fixes: a2b96ece5b ("tools: add i.MX8/8X image support")
Signed-off-by: Mikhail Ilin <ilin.mikhail.ol@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
			
			
This commit is contained in:
		
				
					committed by
					
						 Stefano Babic
						Stefano Babic
					
				
			
			
				
	
			
			
			
						parent
						
							9017785acd
						
					
				
				
					commit
					f75e92f7f7
				
			| @@ -279,6 +279,7 @@ static uint32_t parse_cfg_file(image_t *param_stack, char *name) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	fclose(fd); | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user