When ext4_fill_super fails, s_flex_groups is not freed.
Fix it.
Signed-off-by: Shen Feng <[email protected]>
---
fs/ext4/super.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b5479b1..6ed0e27 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2487,6 +2487,7 @@ failed_mount4:
jbd2_journal_destroy(sbi->s_journal);
sbi->s_journal = NULL;
failed_mount3:
+ kfree(sbi->s_flex_groups);
percpu_counter_destroy(&sbi->s_freeblocks_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter);
--
1.5.5.1