mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ALSA: synth: emux: soundfont.c: Cleaning up memory leak
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
2c6db77c02
commit
14577c2516
1 changed files with 1 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue