提交 8f587df4 编写于 作者: D Dan Carpenter 提交者: Eric Van Hensbergen

9p: potential ERR_PTR() dereference

p9_client_walk() can return error values if we run out of space or there
is a problem with the network.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 2bfc96a1
......@@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
}
kfree(wnames);
fid_out:
v9fs_fid_add(dentry, fid);
if (!IS_ERR(fid))
v9fs_fid_add(dentry, fid);
err_out:
up_read(&v9ses->rename_sem);
return fid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册