[PATCH] savagefb: Fix kfree before use
authorAntonino A. Daplas <adaplas@gmail.com>
Sat, 11 Mar 2006 11:27:25 +0000 (03:27 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 11 Mar 2006 17:19:35 +0000 (09:19 -0800)
par->edid is kfree'd before using in fb_edid_to_monspecs()

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/savage/savagefb_driver.c

index ab727eaa7f43f3819ca45cff046a3bf057e28b0c..10e6b3aab9eaf18f7bd11824cfa63c12b88ba86e 100644 (file)
@@ -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);