aboutsummaryrefslogtreecommitdiff
path: root/tests/virtio-9p-test.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-02-06 09:31:41 +0000
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-01 11:51:28 +0400
commit2b880bcdbeb87b9cb4e325dd6e872373458f82d9 (patch)
tree541b35efe70cf3bb0e7936824213f84627bba310 /tests/virtio-9p-test.c
parent3caab54d081bb3ce1b237d9628dd2b8ee7680159 (diff)
tests: fix virtio-9p-test leaks
Spotted by ASAN. Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'tests/virtio-9p-test.c')
-rw-r--r--tests/virtio-9p-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c
index 9556291567..43a1ad813f 100644
--- a/tests/virtio-9p-test.c
+++ b/tests/virtio-9p-test.c
@@ -80,7 +80,7 @@ static void qvirtio_9p_pci_stop(QVirtIO9P *v9p)
{
qvirtqueue_cleanup(v9p->dev->bus, v9p->vq, v9p->qs->alloc);
qvirtio_pci_device_disable(container_of(v9p->dev, QVirtioPCIDevice, vdev));
- g_free(v9p->dev);
+ qvirtio_pci_device_free((QVirtioPCIDevice *)v9p->dev);
qvirtio_9p_stop(v9p);
}