]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/ext4/mballoc.c
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)
commit7aa0baeaba4afc4fbed7aad2812a1116e6b0adcd
treea7237b599107d0adf137c465734d4b67ad83d6dd
parent5356f2615cd558c57a1f7d7528d1ad4de3640d96
ext4: Free resources in ext4_mb_init()'s error paths

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>
fs/ext4/mballoc.c