mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00: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: 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>
This commit is contained in:
parent
c95de73da1
commit
a697c671cc
@ -665,6 +665,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
|
||||
}
|
||||
|
||||
pcmciamtd_release(link);
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user