[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>
This commit is contained in:
Amit Choudhary 2007-01-02 21:16:10 +00:00 committed by David Woodhouse
parent aba54da3d0
commit 85de3d9bc7

View File

@ -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;
}