mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	firmware-utils/mktitanimg: fix possible resource leak
Add missing call to `fclose` for file pointer `nsp_image`. Signed-off-by: Andrea Dalla Costa <andrea@dallacosta.me>
This commit is contained in:
		
							parent
							
								
									1775f690d5
								
							
						
					
					
						commit
						8057970d2a
					
				@ -225,6 +225,7 @@ int main(int argc, char* argv[], char* env[])
 | 
			
		||||
			if(fwrite((void*)buf,1,padding,nsp_image)!=padding) {
 | 
			
		||||
				printf("ERROR: can't write to %s.\n", filen_out);
 | 
			
		||||
				free(buf);
 | 
			
		||||
				fclose(nsp_image);
 | 
			
		||||
				return -1;
 | 
			
		||||
			}
 | 
			
		||||
			free(buf);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user