]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[JFFS2] Fix error-path leak in summary scan
authorAmit Choudhary <amit2030@gmail.com>
Tue, 2 Jan 2007 21:16:10 +0000 (21:16 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 2 Jan 2007 21:16:10 +0000 (21:16 +0000)
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
fs/jffs2/scan.c

index ee4fc50b0b20310d844291bf90f748d714c3a875..a167e1c5d0243611427a36493917e7009d87861b 100644 (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;
                }