projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eddecbb
)
fix leaks in path_lookupat()
author
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 23 Mar 2011 13:56:30 +0000
(09:56 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Wed, 23 Mar 2011 13:56:55 +0000
(09:56 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index 5a9a6c3094daf1fe7cd6fbc4e95110dd2bd028e0..a4dfac650c3c4af5f38cfe6478c64c779a41b72a 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-1644,13
+1644,16
@@
static int path_lookupat(int dfd, const char *name,
err = -ECHILD;
}
- if (!err)
+ if (!err)
{
err = handle_reval_path(nd);
+ if (err)
+ path_put(&nd->path);
+ }
if (!err && nd->flags & LOOKUP_DIRECTORY) {
if (!nd->inode->i_op->lookup) {
path_put(&nd->path);
-
return
-ENOTDIR;
+
err =
-ENOTDIR;
}
}