From: Shen Feng <shen@cn.fujitsu.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: fix ext4_fill_super memory leak
Date: Mon, 04 Aug 2008 16:50:10 +0800 [thread overview]
Message-ID: <4896C2C2.4010604@cn.fujitsu.com> (raw)
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
reply other threads:[~2008-08-04 8:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4896C2C2.4010604@cn.fujitsu.com \
--to=shen@cn.fujitsu.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.