]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] drivers/message/i2o/pci.c: fix a use-after-free
authorAdrian Bunk <bunk@stusta.de>
Mon, 28 Nov 2005 11:44:47 +0000 (12:44 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 Dec 2005 23:42:53 +0000 (15:42 -0800)
The Coverity checker spotted this obvious use-after-free

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/message/i2o/pci.c

index 66c03e8825703a408b21c239ff5e4781fab71ffc..81ef306cb1247c40ac2dbb6d1458f71f7b36453c 100644 (file)
@@ -421,8 +421,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
        i2o_pci_free(c);
 
       free_controller:
-       i2o_iop_free(c);
        put_device(c->device.parent);
+       i2o_iop_free(c);
 
       disable:
        pci_disable_device(pdev);