mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
[MTD] Fix potential leak in rfd_ftl_add_mtd
This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
b8e3ec30c2
commit
47af05dd4b
@ -779,6 +779,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
||||
else {
|
||||
if (!mtd->erasesize) {
|
||||
printk(KERN_WARNING PREFIX "please provide block_size");
|
||||
kfree(part);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user