From: Takashi Iwai Date: Tue, 14 Jun 2005 09:26:12 +0000 (+0000) Subject: alsa-tools small handle leak X-Git-Tag: v1.0.10rc1~11 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=792c421e0a7cb42e2885a8e4e831949d9577a574;p=alsa-tools.git alsa-tools small handle leak From: Mario Lang WHile reading hdspmixer sources, I found a potential handler leak. --- diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx index 76a2833..d92d57c 100644 --- a/hdspmixer/src/HDSPMixerWindow.cxx +++ b/hdspmixer/src/HDSPMixerWindow.cxx @@ -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; }