alsa-tools small handle leak

From: Mario Lang <mlang@delysid.org>

WHile reading hdspmixer sources, I found a potential handler leak.
This commit is contained in:
Takashi Iwai 2005-06-14 09:26:12 +00:00
parent bac8fe19d3
commit 792c421e0a

View file

@ -935,6 +935,7 @@ void HDSPMixerWindow::setGain(int in, int out, int value)
snd_ctl_elem_value_set_integer(ctl, 2, value);
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
fprintf(stderr, "Alsa error: %s\n", snd_strerror(err));
snd_ctl_close(handle);
return;
}