mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
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: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
committed by
Miquel Raynal
parent
c95de73da1
commit
a697c671cc
@@ -665,6 +665,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
|
||||
}
|
||||
|
||||
pcmciamtd_release(link);
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user