[JFFS2] Fix error-path leak in summary scan
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 2 16:59:01 EST 2007
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=85de3d9bc779c198f8667cffc291b0ecad082b5e
Commit: 85de3d9bc779c198f8667cffc291b0ecad082b5e
Parent: aba54da3d05e910199ea8255992c244c9abadd91
Author: Amit Choudhary <amit2030 at gmail.com>
AuthorDate: Tue Jan 2 21:16:10 2007 +0000
Committer: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Jan 2 21:16:10 2007 +0000
[JFFS2] Fix error-path leak in summary scan
Signed-off-by: Amit Choudhary <amit2030 at gmail.com>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
fs/jffs2/scan.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index ee4fc50..a167e1c 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -130,6 +130,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
if (jffs2_sum_active()) {
s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
if (!s) {
+ kfree(flashbuf);
JFFS2_WARNING("Can't allocate memory for summary\n");
return -ENOMEM;
}
More information about the linux-mtd-cvs
mailing list