Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0359db1 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Matt Fleming
Browse files

efivarfs: efivarfs_fill_super() ensure we free our temporary name



d_alloc_name() copies the passed name to new storage, once complete we
no longer need our name.

Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Acked-by: default avatarMatthew Garrett <mjg@redhat.com>
Acked-by: default avatarJeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 5c9b50ab
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -992,6 +992,8 @@ int efivarfs_fill_super(struct super_block *sb, void *data, int silent)
		inode = efivarfs_get_inode(efivarfs_sb, root->d_inode,
		inode = efivarfs_get_inode(efivarfs_sb, root->d_inode,
					  S_IFREG | 0644, 0);
					  S_IFREG | 0644, 0);
		dentry = d_alloc_name(root, name);
		dentry = d_alloc_name(root, name);
		/* copied by the above to local storage in the dentry. */
		kfree(name);


		efivars->ops->get_variable(entry->var.VariableName,
		efivars->ops->get_variable(entry->var.VariableName,
					   &entry->var.VendorGuid,
					   &entry->var.VendorGuid,