[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1349951541-20498-5-git-send-email-apw@canonical.com>
Date: Thu, 11 Oct 2012 11:32:20 +0100
From: Andy Whitcroft <apw@...onical.com>
To: Matthew Garrett <mjg@...hat.com>,
Jeremy Kerr <jeremy.kerr@...onical.com>
Cc: Andy Whitcroft <apw@...onical.com>,
Matt Fleming <matt.fleming@...el.com>,
linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 4/5] 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@...onical.com>
---
drivers/firmware/efivars.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 79f3e4e..dcb34ae 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,
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists