Commit 56d2b510 authored by Laszlo Ashin's avatar Laszlo Ashin Committed by Max Kellermann

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.
parent 089c9b7e
...@@ -471,8 +471,10 @@ wavpack_open_wvc(struct decoder *decoder, struct input_stream *is_wvc, ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment