mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
fbdev: s3fb: fix potential memory leak in s3_pci_probe()
commit3b0ed04bc8upstream. In s3_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:86c0f043a7("s3fb: 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1ecbaeec5
commit
0d0fa8425b
@@ -1374,6 +1374,7 @@ err_reg_fb:
|
||||
err_alloc_cmap:
|
||||
err_find_mode:
|
||||
#ifdef CONFIG_FB_S3_DDC
|
||||
fb_destroy_modelist(&info->modelist);
|
||||
if (par->ddc_registered)
|
||||
i2c_del_adapter(&par->ddc_adapter);
|
||||
if (par->mmio)
|
||||
|
||||
Reference in New Issue
Block a user