提交 0ce5cdc9 编写于 作者: D Dan Carpenter 提交者: Miklos Szeredi

ovl: Return -ENOMEM if an allocation fails ovl_lookup()

The error code is missing here so it means we return ERR_PTR(0) or NULL.
The other error paths all return an error code so this probably should
as well.

Fixes: 02b69b28 ("ovl: lookup redirects")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NChandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
上级 b3885bd6
......@@ -635,6 +635,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
}
if (d.redirect) {
err = -ENOMEM;
upperredirect = kstrdup(d.redirect, GFP_KERNEL);
if (!upperredirect)
goto out_put_upper;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册