From: Oleg Drokin <green@namesys.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: [2.5] memleak in drivers/char/vt.c
Date: Fri, 7 Mar 2003 19:28:18 +0300 [thread overview]
Message-ID: <20030307192818.L7347@namesys.com> (raw)
Hello!
Seems there is a memleak on error exit path in drivers/char/vt.c in current bk,
here's the patch. Found with help of smatch + enhanced unfree script.
===== drivers/char/vt.c 1.34 vs edited =====
--- 1.34/drivers/char/vt.c Fri Mar 7 08:27:16 2003
+++ edited/drivers/char/vt.c Fri Mar 7 19:25:45 2003
@@ -747,8 +747,10 @@
screenbuf_size = new_screen_size;
err = resize_screen(currcons, new_cols, new_rows);
- if (err)
+ if (err) {
+ kfree(newscreen);
return err;
+ }
rlth = min(old_row_size, new_row_size);
rrem = new_row_size - rlth;
Bye,
Oleg
reply other threads:[~2003-03-07 16:18 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=20030307192818.L7347@namesys.com \
--to=green@namesys.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