diff options
author | Amit Choudhary <amit2030@gmail.com> | 2007-01-02 16:16:10 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-01-02 16:16:10 -0500 |
commit | 85de3d9bc779c198f8667cffc291b0ecad082b5e (patch) | |
tree | 8e1e3c8342c4915decf39c8b1b3c6e84a5e78f4c | |
parent | aba54da3d05e910199ea8255992c244c9abadd91 (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>
-rw-r--r-- | 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 ee4fc50b0b20..a167e1c5d024 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c | |||
@@ -130,6 +130,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) | |||
130 | if (jffs2_sum_active()) { | 130 | if (jffs2_sum_active()) { |
131 | s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL); | 131 | s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL); |
132 | if (!s) { | 132 | if (!s) { |
133 | kfree(flashbuf); | ||
133 | JFFS2_WARNING("Can't allocate memory for summary\n"); | 134 | JFFS2_WARNING("Can't allocate memory for summary\n"); |
134 | return -ENOMEM; | 135 | return -ENOMEM; |
135 | } | 136 | } |