]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mtd: maps: pcmciamtd: fix potential memory leak in pcmciamtd_detach()
authorAbdun Nihaal <nihaal@cse.iitm.ac.in>
Mon, 3 Nov 2025 15:21:39 +0000 (20:51 +0530)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 17 Nov 2025 10:49:14 +0000 (11:49 +0100)
commita697c671cc317aac3714ac735a336346af15d025
treeb151611413fce05074fa0b5b602d49cb9c874fbb
parentc95de73da12bf4586b7bcd6b23a6968c21991cc7
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: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/maps/pcmciamtd.c