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:

committed by
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,
|
nbytes = decoder_read(decoder, is_wvc,
|
||||||
&first_byte, sizeof(first_byte));
|
&first_byte, sizeof(first_byte));
|
||||||
if (nbytes == 0)
|
if (nbytes == 0) {
|
||||||
|
input_stream_close(is_wvc);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* push it back */
|
/* push it back */
|
||||||
wavpack_input_init(wpi, decoder, is_wvc);
|
wavpack_input_init(wpi, decoder, is_wvc);
|
||||||
|
Reference in New Issue
Block a user