summaryrefslogtreecommitdiffstats
path: root/net/handshake
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-11 17:48:13 +0200
committerJakub Kicinski <kuba@kernel.org>2023-05-25 07:05:24 +0200
commit7afc6d0a107ffbd448c96eb2458b9e64a5af7860 (patch)
tree198633b29853ec7e54dada930170baca157aa4c7 /net/handshake
parentnet/handshake: Fix handshake_dup() ref counting (diff)
downloadlinux-7afc6d0a107ffbd448c96eb2458b9e64a5af7860.tar.xz
linux-7afc6d0a107ffbd448c96eb2458b9e64a5af7860.zip
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 <dan.carpenter@linaro.org> Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/handshake')
-rw-r--r--net/handshake/netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c
index f5dc170689d9..16a4bde648ba 100644
--- a/net/handshake/netlink.c
+++ b/net/handshake/netlink.c
@@ -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))