wavpack: close wvc stream on error
The input stream opened for wvc is not closed in an if branch. A close call has been added.
This commit is contained in:
		 Laszlo Ashin
					Laszlo Ashin
				
			
				
					committed by
					
						 Max Kellermann
						Max Kellermann
					
				
			
			
				
	
			
			
			 Max Kellermann
						Max Kellermann
					
				
			
						parent
						
							089c9b7e5c
						
					
				
				
					commit
					56d2b51056
				
			| @@ -471,8 +471,10 @@ wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc, | ||||
| 	 */ | ||||
| 	nbytes = decoder_read(decoder, is_wvc, | ||||
| 			      &first_byte, sizeof(first_byte)); | ||||
| 	if (nbytes == 0) | ||||
| 	if (nbytes == 0) { | ||||
| 		input_stream_close(is_wvc); | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	/* push it back */ | ||||
| 	wavpack_input_init(wpi, decoder, is_wvc); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user