diff options
| author | Abdun Nihaal <nihaal@cse.iitm.ac.in> | 2026-05-14 13:54:38 +0530 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-06-07 18:25:42 +0200 |
| commit | bb019d755366cc3e777a12d4bf457ff289837370 (patch) | |
| tree | 8d338ee3cee5a99538098036e213f9638f01c3fb | |
| parent | 3b0ed04bc852887a9164e1bbf521652e8ef3eb92 (diff) | |
fbdev: tdfxfb: fix potential memory leak in tdfxfb_probe()
In tdfxfb_probe(), the memory allocated for modelist using
fb_videomode_to_modelist() when CONFIG_FB_3DFX_I2C is defined, is not
freed in the subsequent error paths.
Fix that by calling fb_destroy_modelist().
Fixes: 215059d2421f ("tdfxfb: make use of DDC information about connected monitor")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Helge Deller <deller@gmx.de>
| -rw-r--r-- | drivers/video/fbdev/tdfxfb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c index a6b63c09b48f..cc6a074f3165 100644 --- a/drivers/video/fbdev/tdfxfb.c +++ b/drivers/video/fbdev/tdfxfb.c @@ -1552,6 +1552,7 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id) out_err_iobase: #ifdef CONFIG_FB_3DFX_I2C + fb_destroy_modelist(&info->modelist); tdfxfb_delete_i2c_busses(default_par); #endif arch_phys_wc_del(default_par->wc_cookie); |
