aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-06-14 04:16:11 +0000
committerEric Wong <normalperson@yhbt.net>2008-06-14 04:16:11 +0000
commitc55b9706f6b8c04864570e743c5fe7191e1ee0ad (patch)
treedd36d6d87f6626ca31b5cab580383afbeddfa404 /src
parentda7663fadd236ac60bcc1adb0ef6063b14ec2f26 (diff)
downloadmpd-c55b9706f6b8c04864570e743c5fe7191e1ee0ad.tar.gz
mpd-c55b9706f6b8c04864570e743c5fe7191e1ee0ad.tar.xz
mpd-c55b9706f6b8c04864570e743c5fe7191e1ee0ad.zip
jack: initialize audioOutput->data
Initialize audioOutput->data with NULL in jack_initDriver(). Previously, this was never initialized, although the other functions relied on it being NULL prior to jack_openDevice(). This patch addresses bug 0001641[1]. In contrast to the patch provided by the bug reporter, it moves the initialization before the "!param" check. [1] - http://musicpd.org/mantis/view.php?id=1641 git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.13.0-fixes@7377 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_jack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c
index 1fdfaf4bb..c9df656fc 100644
--- a/src/audioOutputs/audioOutput_jack.c
+++ b/src/audioOutputs/audioOutput_jack.c
@@ -192,7 +192,9 @@ static int jack_initDriver(AudioOutput *audioOutput, ConfigParam *param)
BlockParam *bp;
char *endptr;
int val;
- char *cp = NULL;
+ char *cp = NULL;
+
+ audioOutput->data = NULL;
DEBUG("jack_initDriver (pid=%d)\n", getpid());
if ( ! param ) return 0;