ext4: Fix memory leak fix when mounting an ext4 filesystem
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 17 Jul 2009 13:01:04 +0000 (09:01 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Jul 2009 13:01:04 +0000 (09:01 -0400)
commit024eab4d5bf7e3168a2b71038b3e04e6b1f376ed
tree1a588b519826ce0adde9c539e34154abcd2d156e
parentab86e5765d41a5eb4239a1c04d613db87bea5ed8
ext4: Fix memory leak fix when mounting an ext4 filesystem

The allocation of the ext4_group_info array was moved to a new
function ext4_mb_add_group_info() in commit 5f21b0e6 so that online
resize would use a common (and correct) codepath.  Unfortunately, the
call to the new ext4_mb_add_group_info() function was added without
removing the code which originally allocated the array.  This caused a
memory leak each time an ext4 filesystem was mounted.

The fix is simple; remove the code that did the original allocation,
since it is no longer needed.

Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c