lkml.org 
[lkml]   [2008]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[Patch 9/9] fs/exec.c: fix a wrong goto path
Date
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) {

\
 
 \ /
  Last update: 2008-05-08 16:01    [W:0.134 / U:23.672 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site