mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
fbdev: carminefb: fix potential memory leak in alloc_carmine_fb()
The memory allocated for modelist in fb_videomode_to_modelist() is not
freed in the subsequent error path.
Fix that by calling fb_destroy_modelist()
Fixes: 2ece5f43b0 ("fbdev: add the carmine FB driver")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
committed by
Helge Deller
parent
df8c1101c9
commit
6fcca16a2b
@@ -589,6 +589,7 @@ static int alloc_carmine_fb(void __iomem *regs, void __iomem *smem_base,
|
||||
return 0;
|
||||
|
||||
err_dealloc_cmap:
|
||||
fb_destroy_modelist(&info->modelist);
|
||||
fb_dealloc_cmap(&info->cmap);
|
||||
err_free_fb:
|
||||
framebuffer_release(info);
|
||||
|
||||
Reference in New Issue
Block a user