[Patch 9/9] fs/exec.c: fix a wrong goto path

WANG Cong
2008-05-08T13:58:35Z

When nameidata_to_filp() fails, I see no reasons to fall into 'out' path
where doesn't free any resources at all.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>

---
diff --git a/fs/exec.c b/fs/exec.c
index aeaa979..0220427 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -123,7 +123,7 @@ asmlinkage long sys_uselib(const char __user * library)
file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE);
error = PTR_ERR(file);
if (IS_ERR(file))
- goto out;
+ goto exit;

error = -ENOEXEC;
if(file->f_op) {