projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67756e3
)
ALSA: sparc: Add missing kfree in error path
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Fri, 17 Jul 2015 18:33:21 +0000
(20:33 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 17 Jul 2015 20:29:43 +0000
(22:29 +0200)
If 'of_ioremap' fails, then 'amd' should be freed, otherwise, there is a
memory leak.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sparc/amd7930.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/sparc/amd7930.c
b/sound/sparc/amd7930.c
index 1b1a89e80d1394bb253aecc3cadc683dbcff3a36..784ceb85b2d9fe7cbe989d0c8443863f1d03df34 100644
(file)
--- a/
sound/sparc/amd7930.c
+++ b/
sound/sparc/amd7930.c
@@
-956,6
+956,7
@@
static int snd_amd7930_create(struct snd_card *card,
if (!amd->regs) {
snd_printk(KERN_ERR
"amd7930-%d: Unable to map chip registers.\n", dev);
+ kfree(amd);
return -EIO;
}