mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
mixer - fix typo and memory leak
This commit is contained in:
parent
23c8d481a2
commit
157cb698ac
2 changed files with 5 additions and 2 deletions
|
|
@ -598,7 +598,10 @@ static int selem_write(snd_mixer_elem_t *elem)
|
|||
static void selem_free(snd_mixer_elem_t *elem)
|
||||
{
|
||||
assert(snd_mixer_elem_get_type(elem) == SND_MIXER_ELEM_SIMPLE);
|
||||
free(snd_mixer_elem_get_private(elem));
|
||||
selem_none_t *simple = snd_mixer_elem_get_private(elem);
|
||||
if (simple->selem.id)
|
||||
snd_mixer_selem_id_free(simple->selem.id);
|
||||
free(simple);
|
||||
}
|
||||
|
||||
static int simple_update(snd_mixer_elem_t *melem)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue