aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNix <nix@esperi.org.uk>2014-11-24 13:02:07 +0000
committerMax Kellermann <max@duempel.org>2014-12-01 22:14:09 +0100
commit811af02f56a829fb2177d25b7eb4f93212a4ea9e (patch)
tree3ee8e30b56954324a64c4bf89644efc96bcb2d48
parent8780e23ed32b7bd90663f62fb6a2b68e00983bcb (diff)
downloadmpd-811af02f56a829fb2177d25b7eb4f93212a4ea9e.tar.gz
mpd-811af02f56a829fb2177d25b7eb4f93212a4ea9e.tar.xz
mpd-811af02f56a829fb2177d25b7eb4f93212a4ea9e.zip
Output: start with a null mixer.
There are code paths (mostly error cases) in which it is possible to initialize an AudioOutput and then kill it without ever calling audio_output_new(). In such a case, its destructor will attempt to free a mixer that was never initialized, leading to an attempt to take out a lock on a mutex that was similarly never initialized, which hangs forever. Fix by always initializing the mixer appropriately.
-rw-r--r--src/output/Init.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/output/Init.cxx b/src/output/Init.cxx
index eafcec432..79ef4f998 100644
--- a/src/output/Init.cxx
+++ b/src/output/Init.cxx
@@ -48,6 +48,7 @@
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin)
:plugin(_plugin),
+ mixer(nullptr),
enabled(true), really_enabled(false),
open(false),
pause(false),