Message ID | 20241106-vsock-mem-leaks-v1-4-8f4ffc3099e6@rbox.co (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | virtio/vsock: Fix memory leaks | expand |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index dfd29160fe11c4675f872c1ee123d65b2da0dae6..c3a37c3d4bf3c8117fbc8bd020da8dc1c9212732 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -275,8 +275,7 @@ static void vsock_insert_unbound(struct vsock_sock *vsk) void vsock_insert_connected(struct vsock_sock *vsk) { - struct list_head *list = vsock_connected_sockets( - &vsk->remote_addr, &vsk->local_addr); + struct list_head *list = vsock_connected_sockets_vsk(vsk); spin_lock_bh(&vsock_table_lock); __vsock_insert_connected(list, vsk);
Macro vsock_connected_sockets_vsk() has been unused since its introduction. Instead of removing it, utilise it in vsock_insert_connected() where it's been open-coded. No functional change intended. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Michal Luczaj <mhal@rbox.co> --- net/vmw_vsock/af_vsock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)