Skip to contentSkip to conversation

leak in hostfs_unlink()

PATCH In review Al Viro 1 participant 1 message Jun 8, 2010

Subsystems (2)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 35/58 leak in hostfs_unlink()

---
 fs/hostfs/hostfs_kern.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
fs/hostfs/hostfs_kern.c +3 -2
index 79783a0..8130ce9 100644
@@ -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;
Signature · 1 line
1.5.6.5