Message ID | 3ae47cb75cebf7c2cc027356edbc6882d89b11f8.1659981325.git.peilin.ye@bytedance.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a3e7b29e30854ed67be0d17687e744ad0c769c4b |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v3,1/2] vsock: Fix memory leak in vsock_connect() | expand |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 4d68681f5abe..b4ee163154a6 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1286,6 +1286,7 @@ static void vsock_connect_timeout(struct work_struct *work) if (sk->sk_state == TCP_SYN_SENT && (sk->sk_shutdown != SHUTDOWN_MASK)) { sk->sk_state = TCP_CLOSE; + sk->sk_socket->state = SS_UNCONNECTED; sk->sk_err = ETIMEDOUT; sk_error_report(sk); vsock_transport_cancel_pkt(vsk);