提交 bd23a539 编写于 作者: A Al Viro

fix leaks in path_lookupat()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 eddecbb6
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册