diff options
author | Max Kellermann <max@duempel.org> | 2016-08-05 18:15:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-08-05 18:15:30 +0200 |
commit | d042ab87da4aad4a742189437a3293ee7e516203 (patch) | |
tree | 20c4b0140adbc10523a526b35c544a57bdda815b | |
parent | 588303b78def99b851284d46f155c9f8fae67329 (diff) |
decoder/Thread: delete the InputStream on error
Fixes memory leak after stream failure. See
https://bugs.musicpd.org/view.php?id=4562
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/decoder/DecoderThread.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -9,6 +9,7 @@ ver 0.19.18 (not yet released) - sidplay: allow building with libsidplayfp instead of libsidplay2 * output - shout: recognize setting "encoder" instead of "encoding" +* fix memory leak after stream failure * fix build failure with Boost 1.61 * require gcc 4.7 or newer diff --git a/src/decoder/DecoderThread.cxx b/src/decoder/DecoderThread.cxx index d5f73c3e3..2e407e6ff 100644 --- a/src/decoder/DecoderThread.cxx +++ b/src/decoder/DecoderThread.cxx @@ -98,6 +98,7 @@ decoder_input_stream_open(DecoderControl &dc, const char *uri) if (!is->Check(error)) { dc.Unlock(); + delete is; LogError(error); return nullptr; |