Commit 14577c25 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Takashi Iwai

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: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2c6db77c
......@@ -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 */
......
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