projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c6db77
)
ALSA: synth: emux: soundfont.c: Cleaning up memory leak
author
Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se>
Sun, 1 Jun 2014 11:35:24 +0000
(13:35 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Sun, 1 Jun 2014 12:33:09 +0000
(14:33 +0200)
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
[fixed a typo of kfree() by tiwai]
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/synth/emux/soundfont.c
patch
|
blob
|
history
diff --git
a/sound/synth/emux/soundfont.c
b/sound/synth/emux/soundfont.c
index 1137b85c36e6d5d9e9c103810975a6f7c79d539f..78683b2064f709a55bf0dff1b2edba002158d114 100644
(file)
--- a/
sound/synth/emux/soundfont.c
+++ b/
sound/synth/emux/soundfont.c
@@
-1021,6
+1021,7
@@
load_guspatch(struct snd_sf_list *sflist, const char __user *data,
data, count);
if (rc < 0) {
sf_sample_delete(sflist, sf, smp);
+ kfree(zone);
return rc;
}
/* memory offset is updated after */