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

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;