mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-15 19:25:13 +00:00
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: 02b69b284c ("ovl: lookup redirects")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
b3885bd6ed
commit
0ce5cdc9d7
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue