summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorAmit Choudhary <amit2030@gmail.com>2007-01-02 21:16:10 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2007-01-02 21:16:10 +0000
commit85de3d9bc779c198f8667cffc291b0ecad082b5e (patch)
tree8e1e3c8342c4915decf39c8b1b3c6e84a5e78f4c /fs/jffs2/scan.c
parentaba54da3d05e910199ea8255992c244c9abadd91 (diff)
[JFFS2] Fix error-path leak in summary scan
Signed-off-by: Amit Choudhary <amit2030@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index ee4fc50b0b2..a167e1c5d02 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;
}