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

index d27f412..c861134 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);
        }