libqos: add qvirtqueue_cleanup()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 5 May 2016 15:53:35 +0000 (16:53 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 20 Jun 2016 10:44:12 +0000 (11:44 +0100)
commitf1d3b99154138741161fc52f5a8c373bf71613c6
tree9b8dc89292f0f64c6151601192a12c0805bc3047
parentc75f4c061bacad0c41708bf17d526fac72314ad0
libqos: add qvirtqueue_cleanup()

qvirtqueue_setup() allocates the vring and virtqueue state.  So far
there has been no function to free it.  Callers have been using
guest_free() for the vring but forgot to free the QVirtQueue state.

This patch solves the memory leak by introducing qvirtqueue_cleanup().

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/libqos/virtio-mmio.c
tests/libqos/virtio-pci.c
tests/libqos/virtio.c
tests/libqos/virtio.h
tests/virtio-blk-test.c
tests/virtio-net-test.c
tests/virtio-scsi-test.c