Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ce5cdc9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Miklos Szeredi
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarChandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent b3885bd6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;