From: Wade <neroz@ii.net>
To: David Yu Chen <dychen@stanford.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix memleak in emu10k1/midi.c (was: Re: [CHECKER] 32 Memory Leaks on Error Paths)
Date: Tue, 16 Sep 2003 18:18:08 +0800 [thread overview]
Message-ID: <3F66E360.9090101@ii.net> (raw)
In-Reply-To: <200309160435.h8G4ZkQM009953@elaine4.Stanford.EDU>
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
David Yu Chen wrote:
> Hi All,
>
[snip]
> [FILE: 2.6.0-test5/sound/oss/emu10k1/midi.c]
> [FUNC: emu10k1_seq_midi_open]
> [LINES: 498-514]
> [VAR: midi_dev]
> 493: if (card->open_mode) /* card is opened native */
> 494: return -EBUSY;
> 495:
> 496: DPF(2, "emu10k1_seq_midi_open()\n");
> 497:
> START -->
> 498: if ((midi_dev = (struct emu10k1_mididevice *) kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL)
> 499: return -EINVAL;
> 500:
> 501: midi_dev->card = card;
> 502: midi_dev->mistate = MIDIIN_STATE_STOPPED;
> 503: init_waitqueue_head(&midi_dev->oWait);
> ... DELETED 5 lines ...
> 509:
> 510: dsCardMidiOpenInfo.refdata = (unsigned long) midi_dev;
> 511:
> 512: if (emu10k1_mpuout_open(card, &dsCardMidiOpenInfo) < 0) {
> 513: ERROR();
> END -->
> 514: return -ENODEV;
> 515: }
> 516:
> 517: card->seq_mididev = midi_dev;
> 518:
> 519: return 0;
> ---------------------------------------------------------
Can I ask again why the Checker is not released? I know that you don't
have to release the source since you are not distributing it, but why
not? AFAICS this would be a great asset to Open Source projects in
general, not just the kernel.
(Patch correct? looked obvious)
[-- Attachment #2: emu10k1_midi_memleak.diff --]
[-- Type: text/plain, Size: 313 bytes --]
--- linux-2.6.0-test5.old/sound/oss/emu10k1/midi.c 2003-09-09 21:24:39.000000000 +0800
+++ linux-2.6.0-test5.new/sound/oss/emu10k1/midi.c 2003-09-16 18:08:23.000000000 +0800
@@ -511,6 +511,7 @@
if (emu10k1_mpuout_open(card, &dsCardMidiOpenInfo) < 0) {
ERROR();
+ kfree(midi_dev);
return -ENODEV;
}
next prev parent reply other threads:[~2003-09-16 10:18 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-16 4:35 [CHECKER] 32 Memory Leaks on Error Paths David Yu Chen
2003-09-16 6:40 ` Neil Brown
2003-09-16 6:55 ` Jörn Engel
2003-09-16 6:55 ` Jörn Engel
2003-09-16 7:21 ` [PATCH] fix memleak in fs/jffs2/scan.c (was: re: [CHECKER] 32 Memory Leaks on Error Paths) Jörn Engel
2003-09-16 7:21 ` Jörn Engel
2003-09-16 7:32 ` [CHECKER] 32 Memory Leaks on Error Paths Jörn Engel
2003-09-16 7:32 ` Jörn Engel
2003-09-16 8:51 ` Jörn Engel
2003-09-16 8:51 ` Jörn Engel
2003-09-16 14:52 ` Timothy Miller
2003-09-16 14:52 ` Timothy Miller
2003-09-16 15:02 ` Wade
2003-09-16 15:04 ` Valdis.Kletnieks
2003-09-16 15:04 ` Valdis.Kletnieks
2003-09-16 15:04 ` Nick Piggin
2003-09-16 15:04 ` Nick Piggin
2003-09-16 8:45 ` Wade
2003-09-16 8:56 ` Jörn Engel
2003-09-16 12:10 ` Andries Brouwer
2003-09-16 9:07 ` Jörn Engel
2003-09-20 7:58 ` David S. Miller
2003-09-16 9:48 ` [PATCH] bttv-risc.c (was: Re: [CHECKER] 32 Memory Leaks on Error Paths) Wade
2003-09-16 10:18 ` Wade [this message]
2003-09-16 12:03 ` [CHECKER] 32 Memory Leaks on Error Paths Andries Brouwer
2003-09-19 23:03 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-19 23:04 ` Chris Wright
2003-09-23 13:15 ` Stephen Smalley
2003-09-23 18:02 ` Chris Wright
2003-09-22 22:54 ` Chris Wright
2003-09-22 22:55 ` Chris Wright
2003-09-22 22:55 ` Chris Wright
2003-09-23 20:13 ` Chris Wright
2003-09-23 20:25 ` Greg KH
2003-09-23 21:38 ` Chris Wright
2003-09-23 22:14 ` Chris Wright
2003-09-24 0:17 ` Greg KH
2003-09-23 20:14 ` Chris Wright
2003-09-24 7:08 ` David Howells
2003-09-23 20:14 ` Chris Wright
2003-09-23 20:21 ` Jean Tourrilhes
2003-09-23 20:24 ` Chris Wright
2003-09-23 20:14 ` Chris Wright
2003-09-23 20:15 ` Chris Wright
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F66E360.9090101@ii.net \
--to=neroz@ii.net \
--cc=dychen@stanford.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.