Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1050643431c74d29ac972141cb24df1d9aca65cd
Commit:     1050643431c74d29ac972141cb24df1d9aca65cd
Parent:     4cfff0db3a60a775c29abd9cbc300fc0f616904b
Author:     Florin Malita <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 16:45:18 2007 -0400
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Mon Jul 23 12:05:07 2007 +0100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to