]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
tests: fix virtio-9p-test leaks
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 6 Feb 2017 09:31:41 +0000 (09:31 +0000)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 1 Mar 2017 07:51:28 +0000 (11:51 +0400)
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>
tests/virtio-9p-test.c

index 9556291567a47cc43d4f02f65fa6dd4dbc6a04ce..43a1ad813fdaf41226b614c9865879ea7365984a 100644 (file)
@@ -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);
 }