mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
staging: fbtft: fix potential memory leak in fbtft_framebuffer_alloc()
[ Upstream commiteb2cb7dab6
] In the error paths after fb_info structure is successfully allocated, the memory allocated in fb_deferred_io_init() for info->pagerefs is not freed. Fix that by adding the cleanup function on the error path. Fixes:c296d5f995
("staging: fbtft: core support") Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/20250626172412.18355-1-abdun.nihaal@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ecdade35dc
commit
6f9e2cf9e9
|
@ -744,6 +744,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
|
|||
return info;
|
||||
|
||||
release_framebuf:
|
||||
fb_deferred_io_cleanup(info);
|
||||
framebuffer_release(info);
|
||||
|
||||
alloc_fail:
|
||||
|
|
Loading…
Reference in New Issue
Block a user