aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/wavpack_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 3d390455f..995ec9290 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -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);