Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] Fix memory leak in vc_resize/vc_allocate
Memory leaks can happen in the vc_resize() function in drivers/char/vt.c because of the vc->vc_screenbuf variable overriding in vc_allocate(). The kmemleak reported trace is as follows: <__kmalloc> <vc_resize> <fbcon_init> <visual_init> <vc_allocate> <con_open> <tty_open> <chrdev_open> This patch no longer allocates a screen buffer in vc_allocate() if it was already allocated by vc_resize(). Signed-off-by: Catalin Marinas <[email protected]> Acked-by: "Antonino A. Daplas" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information