static void e1000e_pci_foreach_callback(QPCIDevice *dev, int devfn, void *data)
{
- *(QPCIDevice **) data = dev;
+ QPCIDevice **res = data;
+
+ g_assert_null(*res);
+ *res = dev;
}
static QPCIDevice *e1000e_device_find(QPCIBus *bus)
e1000e_device_clear(test_bus, d);
close(test_sockets[0]);
pc_alloc_uninit(test_alloc);
+ g_free(d->pci_dev);
qpci_free_pc(test_bus);
qtest_end();
}