summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu2018-09-05 08:54:01 +0200
committerJaegeuk Kim2018-09-12 02:09:32 +0200
commit0b2103e886e6de9802e1170e57c573443286a483 (patch)
treea7e01bba968ef6ca535a0671465ec01b58fdb2b8 /fs/f2fs/super.c
parentf2fs: cache NULL when both default_acl and acl are NULL (diff)
downloadkernel-qcow2-linux-0b2103e886e6de9802e1170e57c573443286a483.tar.gz
kernel-qcow2-linux-0b2103e886e6de9802e1170e57c573443286a483.tar.xz
kernel-qcow2-linux-0b2103e886e6de9802e1170e57c573443286a483.zip
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>
Diffstat (limited to 'fs/f2fs/super.c')
-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 968746e23feb..2f55713f7f99 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2871,7 +2871,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++) {