Skip to content

Commit

Permalink
[MTD] Fix potential leak in rfd_ftl_add_mtd
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florin Malita authored and David Woodhouse committed Aug 2, 2007
1 parent b8e3ec3 commit 47af05d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/rfd_ftl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47af05d

Please sign in to comment.