diff options
author | Florin Malita <fmalita@gmail.com> | 2007-07-19 20:45:18 (GMT) |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-08-02 20:44:10 (GMT) |
commit | 47af05dd4b98b57eeb682596a0df42d106e02167 (patch) | |
tree | 35c5c38928e94fbf3b85e18a2a8108660150e472 /drivers/mtd | |
parent | b8e3ec30c232eb76c96ecab52205fe46e8b0473a (diff) | |
download | linux-fsl-qoriq-47af05dd4b98b57eeb682596a0df42d106e02167.tar.xz |
[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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/rfd_ftl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c index d4b1ba8..006c03a 100644 --- a/drivers/mtd/rfd_ftl.c +++ b/drivers/mtd/rfd_ftl.c @@ -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 |