]> Git Repo - qemu.git/blobdiff - tests/e1000e-test.c
iotests: Add preallocated growth test for qcow2
[qemu.git] / tests / e1000e-test.c
index 8c42ca919f028bcac58520fdea59a1c5ef1119da..c612dc64ecff27e46c09830115a2014cd2769b4f 100644 (file)
@@ -99,7 +99,10 @@ static QPCIBus *test_bus;
 
 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)
@@ -403,6 +406,7 @@ static void data_test_clear(e1000e_device *d)
     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();
 }
This page took 0.022561 seconds and 4 git commands to generate.