]> git.alsa-project.org Git - alsa-tools.git/commitdiff
alsa-tools small handle leak
authorTakashi Iwai <tiwai@suse.de>
Tue, 14 Jun 2005 09:26:12 +0000 (09:26 +0000)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Jun 2005 09:26:12 +0000 (09:26 +0000)
From: Mario Lang <mlang@delysid.org>

WHile reading hdspmixer sources, I found a potential handler leak.

hdspmixer/src/HDSPMixerWindow.cxx

index 76a2833a2eecbc1ce461853641bbb7523ebde098..d92d57ca649aa29033d34025a808eea80cefb99e 100644 (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;
     }