提交 c0359db1 编写于 作者: A Andy Whitcroft 提交者: Matt Fleming

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: NAndy Whitcroft <apw@canonical.com>
Acked-by: NMatthew Garrett <mjg@redhat.com>
Acked-by: NJeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
上级 5c9b50ab
......@@ -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,
S_IFREG | 0644, 0);
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,
&entry->var.VendorGuid,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册