From: Chao Yu Date: Wed, 5 Sep 2018 06:54:01 +0000 (+0800) Subject: f2fs: fix memory leak of write_io in fill_super() X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~6096^2~52 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=0b2103e886e6de9802e1170e57c573443286a483;p=linux.git 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 Signed-off-by: Jaegeuk Kim --- 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++) {