Commit 5667cc2b authored by Oleg Drokin's avatar Oleg Drokin Committed by Linus Torvalds

[PATCH] memleak in drivers/char/vt.c

Seems there is a memleak on error exit path in drivers/char/vt.c, here's
the patch.  Found with help of smatch + enhanced unfree script.
parent b684b67a
...@@ -747,8 +747,10 @@ int vc_resize(int currcons, unsigned int cols, unsigned int lines) ...@@ -747,8 +747,10 @@ int vc_resize(int currcons, unsigned int cols, unsigned int lines)
screenbuf_size = new_screen_size; screenbuf_size = new_screen_size;
err = resize_screen(currcons, new_cols, new_rows); err = resize_screen(currcons, new_cols, new_rows);
if (err) if (err) {
kfree(newscreen);
return err; return err;
}
rlth = min(old_row_size, new_row_size); rlth = min(old_row_size, new_row_size);
rrem = new_row_size - rlth; rrem = new_row_size - rlth;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment