Commit a697c671 authored by Abdun Nihaal's avatar Abdun Nihaal Committed by Miquel Raynal
Browse files

mtd: maps: pcmciamtd: fix potential memory leak in pcmciamtd_detach()



The memory allocated for struct pcmciamtd_dev in pcmciamtd_probe() is
not freed in the corresponding remove function pcmciamtd_detach().
Fix that by freeing it in the remove function.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarAbdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent c95de73d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -665,6 +665,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
	}

	pcmciamtd_release(link);
	kfree(dev);
}