All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Fang <fangwei1@huawei.com>
To: <computersforpeace@gmail.com>, <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: [PATCH] jffs2: remove unneeded kfree
Date: Thu, 25 Jun 2015 15:29:37 +0800	[thread overview]
Message-ID: <558BADE1.2070704@huawei.com> (raw)

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

             reply	other threads:[~2015-06-25  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  7:29 Wei Fang [this message]
2015-07-06 22:27 ` [PATCH] jffs2: remove unneeded kfree 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558BADE1.2070704@huawei.com \
    --to=fangwei1@huawei.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.