dereferencing ERR_PTR()
Subsystems (3)
PATCH 1/1 dereferencing ERR_PTR()
It's possible for __rpc_lookup_create() to return ERR_PTR(-ENOMEM).
Found by smatch static checker.
regards,
dan carpenter
Signed-off-by Dan Carpenter <[email protected]>
net/sunrpc/rpc_pipe.c +2 -0
@@ -587,6 +587,8 @@struct dentry *dentry; dentry =__rpc_lookup_create (parent, name); +if (IS_ERR (dentry)) +return dentry;if (dentry->d_inode ==NULL )return dentry;dput (dentry);