Re: Misc 2.5 Fixes: mem-leak-emu10k1

From: Dipankar Sarma (dipankar@in.ibm.com)
Date: Tue Jun 10 2003 - 05:23:36 EST


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) {

_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:23 EST