From: Amit Choudhary Date: Tue, 2 Jan 2007 21:16:10 +0000 (+0000) Subject: [JFFS2] Fix error-path leak in summary scan X-Git-Tag: v2.6.20-rc6~47^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85de3d9bc779c198f8667cffc291b0ecad082b5e;p=linux-2.6 [JFFS2] Fix error-path leak in summary scan Signed-off-by: Amit Choudhary Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index ee4fc50b0b..a167e1c5d0 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; }