Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 */