From: Oleg Drokin <green@linuxhacker.ru>
To: alan@redhat.com, linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: Memleak in Windows Logical Disk Manager partition handler
Date: Sun, 9 Mar 2003 23:41:25 +0300 [thread overview]
Message-ID: <20030309204125.GA31534@linuxhacker.ru> (raw)
Hello!
Not freeing allocated memory on error exit path.
See the patch.
Should apply to both 2.4 and 2.5.
Found with help of smatch + enhanced unfree script.
Bye,
Oleg
===== fs/partitions/ldm.c 1.6 vs edited =====
--- 1.6/fs/partitions/ldm.c Mon Aug 12 00:08:42 2002
+++ edited/fs/partitions/ldm.c Sun Mar 9 23:38:15 2003
@@ -1223,8 +1223,10 @@
return FALSE;
}
- if (!ldm_parse_vblk (data, len, vb))
+ if (!ldm_parse_vblk (data, len, vb)) {
+ kfree(vb);
return FALSE; /* Already logged */
+ }
/* Put vblk into the correct list. */
switch (vb->type) {
reply other threads:[~2003-03-09 20:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030309204125.GA31534@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox