[PATCH 2/7] ext4: possible sbi->s_group_desc leak in ext4_fill_super

From: Vasily Averin
Date: Wed Oct 31 2018 - 15:12:32 EST


Fixes bfe0a5f47ada ("ext4: add more mount time checks of the superblock") # 4.18

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx>
---
fs/ext4/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a221f1cdf704..ed4d36506ec2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4100,7 +4100,8 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
le32_to_cpu(es->s_inodes_count),
((u64)sbi->s_groups_count * sbi->s_inodes_per_group));
ret = -EINVAL;
- goto failed_mount;
+ db_count = 0;
+ goto failed_mount2;
}

bgl_lock_init(sbi->s_blockgroup_lock);
--
2.17.1