tests: fix memory leak in virtio-scsi-test
vs is allocated in qvirtio_scsi_pci_init() and never freed. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
b1fc72f0fb
commit
f62e0bbb39
@ -64,6 +64,7 @@ static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs)
|
||||
qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev));
|
||||
g_free(vs->dev);
|
||||
qpci_free_pc(vs->bus);
|
||||
g_free(vs);
|
||||
}
|
||||
|
||||
static uint64_t qvirtio_scsi_alloc(QVirtIOSCSI *vs, size_t alloc_size,
|
||||
|
Loading…
Reference in New Issue
Block a user