vsock/virtio: free packets during the socket release
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 17 May 2019 14:45:43 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:26:44 +0000 (18:26 +0200)
commit4ea082cd3c400cd5bb36a7beb7e441bf3e29350d
tree9685b2566491119b4afc545dacccefa1da09d637
parenta336df52d00791b90970a419c5458068ff4e3c26
vsock/virtio: free packets during the socket release

[ Upstream commit ac03046ece2b158ebd204dfc4896fd9f39f0e6c8 ]

When the socket is released, we should free all packets
queued in the per-socket list in order to avoid a memory
leak.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/vmw_vsock/virtio_transport_common.c