aboutsummaryrefslogtreecommitdiff
path: root/tests/virtio-scsi-test.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-02-06 09:21:19 +0000
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-01 11:51:28 +0400
commit3caab54d081bb3ce1b237d9628dd2b8ee7680159 (patch)
tree6c14a9f136cf5aff7dc3c3e63986864ea1f787ae /tests/virtio-scsi-test.c
parent448fe3c1349b540c66e048788dd98b9c80775c53 (diff)
downloadqemu-3caab54d081bb3ce1b237d9628dd2b8ee7680159.zip
qemu-3caab54d081bb3ce1b237d9628dd2b8ee7680159.tar.gz
qemu-3caab54d081bb3ce1b237d9628dd2b8ee7680159.tar.bz2
tests: fix virtio-scsi-test leak
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/virtio-scsi-test.c')
-rw-r--r--tests/virtio-scsi-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
index 69220ef..0eabd56 100644
--- a/tests/virtio-scsi-test.c
+++ b/tests/virtio-scsi-test.c
@@ -63,7 +63,7 @@ static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs)
qvirtqueue_cleanup(vs->dev->bus, vs->vq[i], vs->qs->alloc);
}
qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev));
- g_free(vs->dev);
+ qvirtio_pci_device_free((QVirtioPCIDevice *)vs->dev);
qvirtio_scsi_stop(vs->qs);
g_free(vs);
}