diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-10-11 06:32:20 -0400 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-10-30 06:39:23 -0400 |
commit | c0359db1a1c484ea810f4d5a877d3b00d107908b (patch) | |
tree | 54d35d771d8b0bd8fd2e0f2b2b6ae4047c9f000c /drivers/firmware | |
parent | 5c9b50ab8ca962bc085cfb49bae947910d73f794 (diff) |
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: Andy Whitcroft <apw@canonical.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efivars.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index adfc4863202b..36b3dd6e1e5e 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -992,6 +992,8 @@ int efivarfs_fill_super(struct super_block *sb, void *data, int silent) | |||
992 | inode = efivarfs_get_inode(efivarfs_sb, root->d_inode, | 992 | inode = efivarfs_get_inode(efivarfs_sb, root->d_inode, |
993 | S_IFREG | 0644, 0); | 993 | S_IFREG | 0644, 0); |
994 | dentry = d_alloc_name(root, name); | 994 | dentry = d_alloc_name(root, name); |
995 | /* copied by the above to local storage in the dentry. */ | ||
996 | kfree(name); | ||
995 | 997 | ||
996 | efivars->ops->get_variable(entry->var.VariableName, | 998 | efivars->ops->get_variable(entry->var.VariableName, |
997 | &entry->var.VendorGuid, | 999 | &entry->var.VendorGuid, |