jffs2: remove unneeded kfree

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 6 10:59:05 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=16c863bbf4dabc1ff67d5c67d2d6e614211528d4
Commit:     16c863bbf4dabc1ff67d5c67d2d6e614211528d4
Parent:     ecb43e0a5f72379095892660c4e1601904ab1949
Author:     fangwei <fangwei1 at huawei.com>
AuthorDate: Tue Jul 7 10:54:26 2015 +0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Sep 28 18:41:07 2015 -0700

    jffs2: remove unneeded kfree
    
    c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
    there is no need to free it.
    
    Signed-off-by: Wei Fang <fangwei1 at huawei.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 fs/jffs2/wbuf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 09ed551..63f31c0 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1274,7 +1274,6 @@ int jffs2_dataflash_setup(struct jffs2_sb_info *c) {
 #ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
 	c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
 	if (!c->wbuf_verify) {
-		kfree(c->oobbuf);
 		kfree(c->wbuf);
 		return -ENOMEM;
 	}



More information about the linux-mtd-cvs mailing list