* [2.5] memleak in drivers/char/vt.c
@ 2003-03-07 16:28 Oleg Drokin
0 siblings, 0 replies; only message in thread
From: Oleg Drokin @ 2003-03-07 16:28 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-07 16:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-07 16:28 [2.5] memleak in drivers/char/vt.c Oleg Drokin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox