Commit a54785ce authored by Andrew Morton's avatar Andrew Morton Committed by James Bottomley

[PATCH] ext2: fix error-path double-free

Fix a double-kfree on an ext2 error path.  Reported by Oleg Drokin.
parent f4d55ef3
...@@ -781,7 +781,6 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -781,7 +781,6 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if (!sbi->s_group_desc[i]) { if (!sbi->s_group_desc[i]) {
for (j = 0; j < i; j++) for (j = 0; j < i; j++)
brelse (sbi->s_group_desc[j]); brelse (sbi->s_group_desc[j]);
kfree(sbi->s_group_desc);
printk ("EXT2-fs: unable to read group descriptors\n"); printk ("EXT2-fs: unable to read group descriptors\n");
goto failed_mount_group_desc; goto failed_mount_group_desc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment