mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
fbdev: vesafb: fix memory leak in vesafb_probe()
commitb15d708995upstream. Since commit73ce73c30b("fbdev: Transfer video= option strings to caller; clarify ownership") the string returned from fb_get_options() is expected to be freed by the caller. But the string is not freed in vesafb_probe(). Fix that by freeing the option string after setup. Fixes:73ce73c30b("fbdev: Transfer video= option strings to caller; clarify ownership") Cc: stable@vger.kernel.org Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d21e6747f3
commit
124df55c72
@@ -255,6 +255,7 @@ static int vesafb_probe(struct platform_device *dev)
|
||||
/* ignore error return of fb_get_options */
|
||||
fb_get_options("vesafb", &option);
|
||||
vesafb_setup(option);
|
||||
kfree(option);
|
||||
|
||||
if (si->orig_video_isVGA != VIDEO_TYPE_VLFB)
|
||||
return -ENODEV;
|
||||
|
||||
Reference in New Issue
Block a user