summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-09-05 14:54:01 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-10-27 11:57:08 -0700
commite95ef46b0d135eba8e15f9aee140f71bd83c8714 (patch)
treeee8166f959212febe1d66c7f3beb81e44a9c3b9a
parent41e7c940b30d135a5424ae1fad018945e0e39008 (diff)
f2fs: fix memory leak of write_io in fill_super()
It needs to release memory allocated for sbi->write_io in error path, otherwise, it will cause memory leak. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 51888dcabb35..c96aa5f3ee80 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2879,7 +2879,7 @@ try_onemore:
GFP_KERNEL);
if (!sbi->write_io[i]) {
err = -ENOMEM;
- goto free_options;
+ goto free_bio_info;
}
for (j = HOT; j < n; j++) {