mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 11:53:53 +00:00
net/handshake: Fix uninitialized local variable
trace_handshake_cmd_done_err() simply records the pointer in @req,
so initializing it to NULL is sufficient and safe.
Reported-by: Dan Carpenter <[email protected]>
Fixes: 3b3009ea8a ("net/handshake: Create a NETLINK service for handling handshake requests")
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Jakub Kicinski
parent
7ea9c1ec66
commit
7afc6d0a10
@@ -157,8 +157,8 @@ out_status:
|
||||
int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct handshake_req *req = NULL;
|
||||
struct socket *sock = NULL;
|
||||
struct handshake_req *req;
|
||||
int fd, status, err;
|
||||
|
||||
if (GENL_REQ_ATTR_CHECK(info, HANDSHAKE_A_DONE_SOCKFD))
|
||||
|
||||
Reference in New Issue
Block a user