linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] jffs2: remove unneeded kfree
@ 2015-06-25  7:29 Wei Fang
  2015-07-06 22:27 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Fang @ 2015-06-25  7:29 UTC (permalink / raw)
  To: computersforpeace, dwmw2; +Cc: linux-mtd

c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
there is no need to free it.

Signed-off-by: Wei Fang <fangwei1@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] jffs2: remove unneeded kfree.
@ 2015-04-07  8:06 fangwei
  2015-07-06 22:23 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: fangwei @ 2015-04-07  8:06 UTC (permalink / raw)
  To: dwmw2, linux-mtd

c->oobbuf hasn't been kmalloced in jffs2_dataflash_setup, so
there is no need to free it.

Signed-off-by: Wei Fang <fangwei1@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-07  1:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-25  7:29 [PATCH] jffs2: remove unneeded kfree Wei Fang
2015-07-06 22:27 ` Brian Norris
  -- strict thread matches above, loose matches on Subject: below --
2015-04-07  8:06 fangwei
2015-07-06 22:23 ` Brian Norris
2015-07-07  1:43   ` Wei Fang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).