mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
fbdev: efifb: fix memory leak in efifb_probe()
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 efifb_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>
This commit is contained in:
parent
033e56fed0
commit
9b6eaf1016
|
|
@ -377,6 +377,7 @@ static int efifb_probe(struct platform_device *dev)
|
|||
if (fb_get_options("efifb", &option))
|
||||
return -ENODEV;
|
||||
efifb_setup(si, option);
|
||||
kfree(option);
|
||||
|
||||
/* We don't get linelength from UGA Draw Protocol, only from
|
||||
* EFI Graphics Protocol. So if it's not in DMI, and it's not
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user