Commit 88303730 authored by Chao Yu's avatar Chao Yu Committed by Greg Kroah-Hartman

f2fs: fix memory leak of write_io in fill_super()

[ Upstream commit 0b2103e8 ]

It needs to release memory allocated for sbi->write_io in error path,
otherwise, it will cause memory leak.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e5b515f5
......@@ -2929,7 +2929,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
GFP_KERNEL);
if (!sbi->write_io[i]) {
err = -ENOMEM;
goto free_options;
goto free_bio_info;
}
for (j = HOT; j < n; j++) {
......
Markdown is supported
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