Permalink
Browse files

Fix memory leak in AudioOutputPulseAudio(). The code in question seem…

…s to serve no purpose but on the offchance that I'm wrong I've kept in place and just ensured that we cleanup after it.
  • Loading branch information...
stuartm committed May 19, 2012
1 parent 99ebebd commit 6655d240572569284cdc34f804b7dd39838a2051
Showing with 5 additions and 1 deletion.
  1. +5 −1 mythtv/libs/libmyth/audio/audiooutputpulse.cpp
@@ -34,7 +34,11 @@ AudioOutputPulseAudio::AudioOutputPulseAudio(const AudioSettings &settings) :
for (unsigned int i = 0; i < PA_CHANNELS_MAX; ++i)
volume_control.values[i] = PA_VOLUME_MUTED;
- ChooseHost();
+ // FIXME What's this all about? It's a const method, it doesn't modify the
+ // state and we ignore the result
+ char *pulse_host = ChooseHost();
+ delete[] pulse_host;
+ //
InitSettings(settings);
if (settings.init)

0 comments on commit 6655d24

Please sign in to comment.