* [PATCH] ext4: Fix memory leak in ext4_fill_super()
@ 2009-05-14 18:37 Manish Katiyar
2009-05-18 4:09 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Manish Katiyar @ 2009-05-14 18:37 UTC (permalink / raw)
To: Theodore Ts'o, ext4
We forget to free up the space allocated for s_blockgroup_lock in case
of failed mounts.
Below patch fixes up the memory leak.
Signed-off-by: Manish Katiyar <mkatiyar@gmail.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 2958f4e..fdc1e12 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2862,6 +2862,7 @@ failed_mount:
brelse(bh);
out_fail:
sb->s_fs_info = NULL;
+ kfree(sbi->s_blockgroup_lock);
kfree(sbi);
lock_kernel();
return ret;
--
1.5.4.3
--
Thanks -
Manish
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-18 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 18:37 [PATCH] ext4: Fix memory leak in ext4_fill_super() Manish Katiyar
2009-05-18 4:09 ` Theodore Tso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).