Hi Andy,
If we break out of the loop on the second (and onwards) iteration,
won't we still have the other inodes and dentries remaining
allocated?
As we calling this from the mount_single() wrapper:
return mount_single(fs_type, flags, data, efivarfs_fill_super);
which does this:
On Thu, Oct 11, 2012 at 10:04:28PM +0800, Jeremy Kerr wrote:
> Hi Andy,
>
> >@@ -969,16 +970,18 @@
> > return -ENOMEM;
> >
> > list_for_each_entry_safe(entry, n, &efivars->list, list) {
> >-struct inode *inode;
> > struct dentry *dentry, *root = efivarfs_sb-
Hi Andy,
@@ -969,16 +970,18 @@
return -ENOMEM;
list_for_each_entry_safe(entry, n, &efivars->list, list) {
- struct inode *inode;
struct dentry *dentry, *root = efivarfs_sb->s_root;
- char *name;
unsigned long si
Ensure we free both the name and inode on error when building the
individual variables.
Signed-off-by: Andy Whitcroft
---
drivers/firmware/efivars.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
4 matches
Mail list logo