Skip to content

Commit de9cf16

Browse files
Abdun Nihaalgregkh
authored andcommitted
fbdev: tridentfb: fix potential memory leak in trident_pci_probe()
commit 7a35ec6 upstream. 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: 6a5e3bd ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 508704d commit de9cf16

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/video/fbdev/tridentfb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,7 @@ static int trident_pci_probe(struct pci_dev *dev,
17051705
return 0;
17061706

17071707
out_unmap2:
1708+
fb_destroy_modelist(&info->modelist);
17081709
if (default_par->ddc_registered)
17091710
i2c_del_adapter(&default_par->ddc_adapter);
17101711
kfree(info->pixmap.addr);

0 commit comments

Comments
 (0)