From: Antonino A. Daplas Date: Sat, 11 Mar 2006 11:27:25 +0000 (-0800) Subject: [PATCH] savagefb: Fix kfree before use X-Git-Tag: Ubuntu-5.2.0-15.16~52945 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8d57f2210e72e0168734bd1503b9e52a71f53d65;p=mirror_ubuntu-eoan-kernel.git [PATCH] savagefb: Fix kfree before use par->edid is kfree'd before using in fb_edid_to_monspecs() Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index ab727eaa7f43..10e6b3aab9ea 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -2021,8 +2021,8 @@ static int __devinit savagefb_probe (struct pci_dev* dev, #if defined(CONFIG_FB_SAVAGE_I2C) savagefb_create_i2c_busses(info); savagefb_probe_i2c_connector(info, &par->edid); - kfree(par->edid); fb_edid_to_monspecs(par->edid, &info->monspecs); + kfree(par->edid); fb_videomode_to_modelist(info->monspecs.modedb, info->monspecs.modedb_len, &info->modelist);