mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
fbdev: tridentfb: fix potential memory leak in trident_pci_probe()
In trident_pci_probe(), the memory allocated for modelist using
fb_videomode_to_modelist() is not freed in subsequent error paths.
Fix that by calling fb_destroy_modelist().
Fixes: 6a5e3bd0c8 ("tridentfb: Add DDC support")
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
bb019d7553
commit
7a35ec619d
|
|
@ -1706,6 +1706,7 @@ static int trident_pci_probe(struct pci_dev *dev,
|
|||
return 0;
|
||||
|
||||
out_unmap2:
|
||||
fb_destroy_modelist(&info->modelist);
|
||||
if (default_par->ddc_registered)
|
||||
i2c_del_adapter(&default_par->ddc_adapter);
|
||||
kfree(info->pixmap.addr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user