mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
fbdev: radeon: fix potential memory leak in radeonfb_pci_register()
The function radeonfb_pci_register() allocates memory for modelist
(by calling radeon_check_modes() which calls fb_add_videomode()).
The memory is appended to info->modelist, but is not freed in subsequent
error paths. Fix this by calling fb_destroy_modelist().
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
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:
parent
894632b862
commit
df8c1101c9
|
|
@ -2476,6 +2476,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev,
|
|||
return 0;
|
||||
err_unmap_fb:
|
||||
iounmap(rinfo->fb_base);
|
||||
fb_destroy_modelist(&info->modelist);
|
||||
err_unmap_rom:
|
||||
kfree(rinfo->mon1_EDID);
|
||||
kfree(rinfo->mon2_EDID);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user