diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-19 16:27:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-19 16:27:03 -0700 |
commit | f4a40a4282f467ec99745c6ba62cb84346e42139 (patch) | |
tree | b5b6a13d626d3f47c5412fbb48d51b17b9e70831 | |
parent | bf61759db409ce21a8f2a5bb442b7c35905a713d (diff) | |
parent | 64e135f1eaba0bbb0cdee859af3328c68d5b9789 (diff) |
Merge tag 'efi-fixes-for-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI fix from Ard Biesheuvel:
- Fix potential memory leak reported by kmemleak
* tag 'efi-fixes-for-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efivarfs: Fix memory leak of efivarfs_fs_info in fs_context error paths
-rw-r--r-- | fs/efivarfs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index c900d98bf494..284d6dbba2ec 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -390,10 +390,16 @@ static int efivarfs_reconfigure(struct fs_context *fc) return 0; } +static void efivarfs_free(struct fs_context *fc) +{ + kfree(fc->s_fs_info); +} + static const struct fs_context_operations efivarfs_context_ops = { .get_tree = efivarfs_get_tree, .parse_param = efivarfs_parse_param, .reconfigure = efivarfs_reconfigure, + .free = efivarfs_free, }; static int efivarfs_check_missing(efi_char16_t *name16, efi_guid_t vendor, |