Staging: ipack/bridges/tpci200: avoid dereference of a freed tpci200->info
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 May 2012 08:03:04 +0000 (10:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jun 2012 05:20:30 +0000 (14:20 +0900)
tpci200->info is used later when uninstalling the module. As there is another
kfree in the proper place, this patch removes the wrong one.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ipack/bridges/tpci200.c

index 67516255480b7b07460898185e1fef2f9a8db966..e04cb8ade9e7b465648602f0f0ed5d5633b1cdf2 100644 (file)
@@ -290,8 +290,6 @@ static void tpci200_unregister(struct tpci200_board *tpci200)
        pci_disable_device(tpci200->info->pdev);
        pci_dev_put(tpci200->info->pdev);
 
-       kfree(tpci200->info);
-
        for (i = 0; i < TPCI200_NB_SLOT; i++) {
                tpci200->slots[i].io_phys.address = NULL;
                tpci200->slots[i].io_phys.size = 0;