Skip to content

Commit 7afc6d0

Browse files
chuckleverkuba-moo
authored andcommitted
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: 3b3009e ("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>
1 parent 7ea9c1e commit 7afc6d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/handshake/netlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ int handshake_nl_accept_doit(struct sk_buff *skb, struct genl_info *info)
157157
int handshake_nl_done_doit(struct sk_buff *skb, struct genl_info *info)
158158
{
159159
struct net *net = sock_net(skb->sk);
160+
struct handshake_req *req = NULL;
160161
struct socket *sock = NULL;
161-
struct handshake_req *req;
162162
int fd, status, err;
163163

164164
if (GENL_REQ_ATTR_CHECK(info, HANDSHAKE_A_DONE_SOCKFD))

0 commit comments

Comments
 (0)