mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fixed free bug (added missing hctl detach call).
This commit is contained in:
parent
460660d4b4
commit
5e2b04c141
1 changed files with 7 additions and 0 deletions
|
|
@ -425,9 +425,16 @@ static int selem_write(snd_mixer_elem_t *elem,
|
|||
|
||||
static void selem_free(snd_mixer_elem_t *elem)
|
||||
{
|
||||
int k;
|
||||
|
||||
selem_t *s;
|
||||
assert(elem->type == SND_MIXER_ELEM_SIMPLE);
|
||||
s = elem->private_data;
|
||||
for (k = 0; k <= CTL_LAST; k++) {
|
||||
if (s->ctls[k].elem)
|
||||
snd_mixer_elem_detach(elem, s->ctls[k].elem);
|
||||
}
|
||||
elem->private_data = NULL;
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue