Skip to content

Commit

Permalink
leak in hostfs_unlink()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Aug 9, 2010
1 parent e919305 commit f8d7e18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f8d7e18

Please sign in to comment.