[PATCH] jffs2: remove unneeded kfree
Wei Fang
fangwei1 at huawei.com
Thu Jun 25 00:29:37 PDT 2015
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>
---
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;
}
-- 1.8.3.1
More information about the linux-mtd
mailing list