dect
/
linux-2.6
Archived
13
0
Fork 0

leak in hostfs_unlink()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2010-06-06 23:19:04 -04:00
parent e9193059b1
commit f8d7e1877e
1 changed files with 3 additions and 2 deletions

View File

@ -622,11 +622,12 @@ int hostfs_unlink(struct inode *ino, struct dentry *dentry)
char *file;
int err;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
if (append)
return -EPERM;
if ((file = dentry_name(dentry)) == NULL)
return -ENOMEM;
err = unlink_file(file);
__putname(file);
return err;