All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: fix ext4_fill_super memory leak
@ 2008-08-04  8:50 Shen Feng
  0 siblings, 0 replies; only message in thread
From: Shen Feng @ 2008-08-04  8:50 UTC (permalink / raw)
  To: linux-ext4


When ext4_fill_super fails, s_flex_groups is not freed.
Fix it.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-04  8:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-04  8:50 [PATCH] ext4: fix ext4_fill_super memory leak Shen Feng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.