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

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 files changed, 0 insertions(+), 1 deletions(-)

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.7.1

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

* Re: [PATCH RESEND] jffs2: remove unneeded kfree
  2015-07-07  2:54 [PATCH RESEND] jffs2: remove unneeded kfree Wei Fang
@ 2015-09-29  1:42 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2015-09-29  1:42 UTC (permalink / raw)
  To: Wei Fang; +Cc: dwmw2, linux-mtd

On Tue, Jul 07, 2015 at 10:54:26AM +0800, Wei Fang wrote:
> 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>

Applied to l2-mtd.git

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

end of thread, other threads:[~2015-09-29  1:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07  2:54 [PATCH RESEND] jffs2: remove unneeded kfree Wei Fang
2015-09-29  1:42 ` Brian Norris

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).