mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
Moved the detach code to the more appropriate place.
This commit is contained in:
parent
5e2b04c141
commit
cba5c929ec
2 changed files with 7 additions and 6 deletions
|
|
@ -425,15 +425,9 @@ 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