diff options
author | Florin Malita <fmalita@gmail.com> | 2007-07-19 16:45:18 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-07-23 07:05:07 -0400 |
commit | 1050643431c74d29ac972141cb24df1d9aca65cd (patch) | |
tree | 2d319cd9feba34e2fddba881da4dd43e225018d7 /drivers/mtd/rfd_ftl.c | |
parent | 4cfff0db3a60a775c29abd9cbc300fc0f616904b (diff) |
[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/rfd_ftl.c')
-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 d4b1ba8f23ef..006c03aacb55 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) | |||
779 | else { | 779 | else { |
780 | if (!mtd->erasesize) { | 780 | if (!mtd->erasesize) { |
781 | printk(KERN_WARNING PREFIX "please provide block_size"); | 781 | printk(KERN_WARNING PREFIX "please provide block_size"); |
782 | kfree(part); | ||
782 | return; | 783 | return; |
783 | } | 784 | } |
784 | else | 785 | else |