mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2026-02-16 22:05:23 -05:00
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:
parent
bac8fe19d3
commit
792c421e0a
1 changed files with 1 additions and 0 deletions
|
|
@ -935,6 +935,7 @@ void HDSPMixerWindow::setGain(int in, int out, int value)
|
||||||
snd_ctl_elem_value_set_integer(ctl, 2, value);
|
snd_ctl_elem_value_set_integer(ctl, 2, value);
|
||||||
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||||
fprintf(stderr, "Alsa error: %s\n", snd_strerror(err));
|
fprintf(stderr, "Alsa error: %s\n", snd_strerror(err));
|
||||||
|
snd_ctl_close(handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue