alsa: fix bad memory access for devices that lack a mixer

This commit is contained in:
Lennart Poettering 2009-06-10 23:22:12 +02:00
parent 89e3adf8cd
commit 1e8a374f2f

View file

@ -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;