ext4: Free resources in ext4_mb_init()'s error paths
authorTao Ma <boyu.mt@taobao.com>
Thu, 6 Oct 2011 14:22:28 +0000 (10:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Oct 2011 14:22:28 +0000 (10:22 -0400)
In commit 79a77c5ac, we move ext4_mb_init_backend after the allocation
of s_locality_group to avoid memory leak in error path, but there are
still some other error paths in ext4_mb_init that need to do the same
work. So this patch adds all the error patch for ext4_mb_init. And all
the pointers are reset to NULL in case the caller may double free them.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

No differences found