From: Andy Whitcroft Date: Thu, 11 Oct 2012 10:32:20 +0000 (+0100) Subject: efivarfs: efivarfs_fill_super() ensure we free our temporary name X-Git-Tag: firefly_0821_release~3680^2~1451^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c0359db1a1c484ea810f4d5a877d3b00d107908b;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Matthew Garrett Acked-by: Jeremy Kerr Signed-off-by: Matt Fleming --- 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) 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,