Commit 327ee932 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Control API - fix the wrong allocation for userspace controls

Control Midlevel
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 10b92f2f
......@@ -928,7 +928,7 @@ static int snd_ctl_elem_add(snd_ctl_file_t *file, snd_ctl_elem_info_t *info, int
if (ue == NULL)
return -ENOMEM;
ue->info = *info;
ue->elem_data = (char *)ue + sizeof(ue);
ue->elem_data = (char *)ue + sizeof(*ue);
ue->elem_data_size = private_size;
kctl.private_free = snd_ctl_elem_user_free;
_kctl = snd_ctl_new(&kctl, access);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment