]> git.hungrycats.org Git - linux/commit
fbdev: carminefb: fix potential memory leak in alloc_carmine_fb()
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Thu, 14 May 2026 08:24:34 +0000 (13:54 +0530)
committerHelge Deller <deller@gmx.de>
Sun, 7 Jun 2026 16:25:42 +0000 (18:25 +0200)
commit6fcca16a2b19c37f60693c56cbc0c923364ff3ef
treede7c459d4637e5fe3378fd29d8bad8b631c40c10
parentdf8c1101c9a08859da612b5d0a08d55d475522c6
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: 2ece5f43b041 ("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>
drivers/video/fbdev/carminefb.c