mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
fix leaks in path_lookupat()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
eddecbb601
commit
bd23a539d0
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue