From: Christian Engelmayer <christian.engelmayer@frequentis.com>
To: dwmw2@infradead.org
Cc: linux-mtd@lists.infradead.org, christian.engelmayer@frequentis.com
Subject: [PATCH 1/1] jffs2: leaking jffs2_summary in function jffs2_scan_medium
Date: Sat, 13 Jun 2009 23:06:29 +0200 [thread overview]
Message-ID: <20090613230629.2a0bc935@frequentis.com> (raw)
From: Christian Engelmayer <christian.engelmayer@frequentis.com>
In case of an error returned by file_dirty() 's' is not freed as the cleanup
path is skipped.
Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
--
Reported by Coverity.
--- linux-2.6.29.4/fs/jffs2/scan.c.orig 2009-06-13 22:49:07.000000000 +0200
+++ linux-2.6.29.4/fs/jffs2/scan.c 2009-06-13 22:29:06.000000000 +0200
@@ -196,7 +196,7 @@ int jffs2_scan_medium(struct jffs2_sb_in
if (c->nextblock) {
ret = file_dirty(c, c->nextblock);
if (ret)
- return ret;
+ goto out;
/* deleting summary information of the old nextblock */
jffs2_sum_reset_collected(c->summary);
}
@@ -207,7 +207,7 @@ int jffs2_scan_medium(struct jffs2_sb_in
} else {
ret = file_dirty(c, jeb);
if (ret)
- return ret;
+ goto out;
}
break;
reply other threads:[~2009-06-13 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090613230629.2a0bc935@frequentis.com \
--to=christian.engelmayer@frequentis.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.