From 1e8a374f2f26edbe68d2fc3c049ef7ccdf855d56 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 10 Jun 2009 23:22:12 +0200 Subject: [PATCH] alsa: fix bad memory access for devices that lack a mixer --- src/modules/alsa/alsa-util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index c03866c..b273625 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -1289,8 +1289,10 @@ int pa_alsa_find_mixer_and_elem( } if (!e) { - if (ctl_device) + if (ctl_device) { pa_xfree(*ctl_device); + *ctl_device = NULL; + } snd_mixer_close(m); return -1; -- 2.7.4