Skip to content

Commit

Permalink
efivarfs: efivarfs_fill_super() ensure we free our temporary name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Whitcroft authored and Matt Fleming committed Oct 30, 2012
1 parent 5c9b50a commit c0359db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c0359db

Please sign in to comment.