ext4: fix memory leak in parse_apply_sb_mount_options()
[linux-2.6-microblaze.git] / fs / ext4 / super.c
index 3f59efd..ea8255a 100644 (file)
@@ -2628,8 +2628,10 @@ parse_failed:
        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;
 }