From 85de3d9bc779c198f8667cffc291b0ecad082b5e Mon Sep 17 00:00:00 2001 From: Amit Choudhary Date: Tue, 2 Jan 2007 21:16:10 +0000 Subject: [PATCH] [JFFS2] Fix error-path leak in summary scan Signed-off-by: Amit Choudhary Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- fs/jffs2/scan.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.5