Skip to content
Commit 79a77c5a authored by Yu Jian's avatar Yu Jian Committed by Theodore Ts'o
Browse files

ext4: prevent memory leaks from ext4_mb_init_backend() on error path



In ext4_mb_init(), if the s_locality_group allocation fails it will
currently cause the allocations made in ext4_mb_init_backend() to
be leaked.  Moving the ext4_mb_init_backend() allocation after the
s_locality_group allocation avoids that problem.

Signed-off-by: default avatarYu Jian <yujian@whamcloud.com>
Signed-off-by: default avatarAndreas Dilger <adilger@whamcloud.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 48e6061b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment