Re: Misc 2.5 Fixes: mem-leak-emu10k1

Dipankar Sarma
2003-06-10T10:09:11Z

Fix memory leak in emu10k1_audio_open.

sound/oss/emu10k1/audio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN sound/oss/emu10k1/audio.c~mem-leak-emu10k1 sound/oss/emu10k1/audio.c
--- linux-2.5.70-ds/sound/oss/emu10k1/audio.c~mem-leak-emu10k1 2003-06-08 22:55:56.000000000 +0530
+++ linux-2.5.70-ds-dipankar/sound/oss/emu10k1/audio.c 2003-06-08 22:57:33.000000000 +0530
@@ -1187,7 +1187,8 @@ match:

if ((woinst = (struct woinst *) kmalloc(sizeof(struct woinst), GFP_KERNEL)) == NULL) {
ERROR();
- return -ENODEV;
+ kfree(wave_dev);
+ return -ENOMEM;
}

if (wave_dev->wiinst != NULL) {

_