[PCMCIA MTD] Fix leak and crash on reboot
authorSean Young <[email protected]>
Wed, 17 May 2006 10:47:48 +0000 (11:47 +0100)
committerDavid Woodhouse <[email protected]>
Wed, 17 May 2006 10:47:48 +0000 (11:47 +0100)
Signed-off-by: Sean Young <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
drivers/mtd/maps/pcmciamtd.c

index d27f4129afd3c952b5e5f33d85cec2e73d41584a..c861134cbc48d253ccc3530568402b0de0665441 100644 (file)
@@ -713,6 +713,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
 
        if(dev->mtd_info) {
                del_mtd_device(dev->mtd_info);
+               map_destroy(dev->mtd_info);
                info("mtd%d: Removed", dev->mtd_info->index);
        }