Message ID | 20220513231605.175121-2-ebiggers@kernel.org |
---|---|
State | New |
Headers | show |
Series | [v3,1/5] ext4: fix memory leak in parse_apply_sb_mount_options() | expand |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 1466fbdbc8e34..60fa2f2623e07 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2625,8 +2625,10 @@ static int parse_apply_sb_mount_options(struct super_block *sb, ret = ext4_apply_options(fc, sb); out_free: - kfree(s_ctx); - kfree(fc); + if (fc) { + ext4_fc_free(fc); + kfree(fc); + } kfree(s_mount_opts); return ret; }