projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e2c177
)
ALSA: vmaster: Zero-clear ctl before calling slave get
author
Takashi Iwai
<tiwai@suse.de>
Thu, 8 Mar 2018 07:32:41 +0000
(08:32 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 8 Mar 2018 07:41:13 +0000
(08:41 +0100)
Use kzalloc() instead of kmalloc() so that we don't need to rely fully
on the slave get() callback to clear the control value that might be
copied to user-space.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/vmaster.c
patch
|
blob
|
history
diff --git
a/sound/core/vmaster.c
b/sound/core/vmaster.c
index b67de2bb06a2f3ac6953ca13b8c22e43511a8d78..9e96186742d0fe26cc215de0e00ee0536d72fbab 100644
(file)
--- a/
sound/core/vmaster.c
+++ b/
sound/core/vmaster.c
@@
-63,7
+63,7
@@
static int slave_update(struct link_slave *slave)
struct snd_ctl_elem_value *uctl;
int err, ch;
- uctl = k
m
alloc(sizeof(*uctl), GFP_KERNEL);
+ uctl = k
z
alloc(sizeof(*uctl), GFP_KERNEL);
if (!uctl)
return -ENOMEM;
uctl->id = slave->slave.id;