[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:
Florin Malita 2007-07-19 16:45:18 -04:00 committed by David Woodhouse
parent b8e3ec30c2
commit 47af05dd4b
1 changed files with 1 additions and 0 deletions

View File

@ -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