Additionally, there's no point copying param->string in exfat_parse_param() - just steal it, leaving NULL in param->string. That's independent from the leak or fix thereof - it's simply avoiding an extra copy.
I find it clearer to provide such a source code adjustment by a separate update step. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu...
Please move it into another patch.
…
+++ b/fs/exfat/super.c
…
@@ -686,7 +685,12 @@ static int exfat_get_tree(struct fs_context *fc)
static void exfat_free(struct fs_context *fc) {
- kfree(fc->s_fs_info);
- struct exfat_sb_info *sbi = fc->s_fs_info;
- if (sbi) {
exfat_free_iocharset(sbi);
kfree(sbi);
- }
}
…
Can it be helpful to annotate the added check according to branch prediction? Are valid pointers likely at this place?
Regards, Markus
linux-stable-mirror@lists.linaro.org