aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:15 +0200
commitedd7e2f94e8f9ca5340ab1c6392417c7e85b3aa9 (patch)
treec19f3140b6874350fb35af67cac0917df6ddd72d
parent806a9f02a10310be5aa8fba16ae87a647b28952a (diff)
downloadmpd-edd7e2f94e8f9ca5340ab1c6392417c7e85b3aa9.tar.gz
mpd-edd7e2f94e8f9ca5340ab1c6392417c7e85b3aa9.tar.xz
mpd-edd7e2f94e8f9ca5340ab1c6392417c7e85b3aa9.zip
jack: don't set audioOutput->data=NULL
There is only one caller of freeJackData() left: jack_finishDriver(). This function is called by the mpd core, and is called exactly once for every successful jack_initDriver(). We do not need to clear audioOutput->data, since this variable is invalidated anyway.
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_jack.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c
index 9fc52055f..5e0b1b599 100644
--- a/src/audioOutputs/audioOutput_jack.c
+++ b/src/audioOutputs/audioOutput_jack.c
@@ -87,11 +87,11 @@ static void freeJackClient(JackData *jd)
static void freeJackData(AudioOutput *audioOutput)
{
JackData *jd = audioOutput->data;
- if (jd) {
- freeJackClient(jd);
- free(jd);
- audioOutput->data = NULL;
- }
+
+ assert(jd != NULL);
+
+ freeJackClient(jd);
+ free(jd);
}
static void jack_finishDriver(AudioOutput *audioOutput)