diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3f59efd3aa3e..ea8255a03305 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2628,8 +2628,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; }