diff options
author | Laszlo Ashin <kodest@gmail.com> | 2008-11-06 06:48:33 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-06 06:48:33 +0100 |
commit | 56d2b510564f57ae7f5212c4ec4f81f4177fae12 (patch) | |
tree | de5437fff3a7ec264343824ecb2ebb0d0aece653 /src | |
parent | 089c9b7e5caf08f5ee1cda32200ab2c056c3d04c (diff) | |
download | mpd-56d2b510564f57ae7f5212c4ec4f81f4177fae12.tar.gz mpd-56d2b510564f57ae7f5212c4ec4f81f4177fae12.tar.xz mpd-56d2b510564f57ae7f5212c4ec4f81f4177fae12.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/decoder/wavpack_plugin.c | 4 |
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); |