From 792c421e0a7cb42e2885a8e4e831949d9577a574 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 14 Jun 2005 09:26:12 +0000 Subject: [PATCH] alsa-tools small handle leak From: Mario Lang WHile reading hdspmixer sources, I found a potential handler leak. --- hdspmixer/src/HDSPMixerWindow.cxx | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.1