On 07/02/2018 04:35 PM, Paolo Bonzini wrote:
On 02/07/2018 16:05, Emanuele Giuseppe Esposito wrote:
@@ -152,6 +152,8 @@ QPCIBus *qpci_init_pc(QTestState *qts, QGuestAllocator
*alloc)
void qpci_free_pc(QPCIBus *bus)
{
+g_assert(bus);
+
QPCIBusPC *s = container_of(bus,
On 02/07/2018 16:05, Emanuele Giuseppe Esposito wrote:
> @@ -152,6 +152,8 @@ QPCIBus *qpci_init_pc(QTestState *qts, QGuestAllocator
> *alloc)
>
> void qpci_free_pc(QPCIBus *bus)
> {
> +g_assert(bus);
> +
> QPCIBusPC *s = container_of(bus, QPCIBusPC, bus);
>
> g_free(s);
> diff
server->bus in _test_server_free() could be NULL, since TestServer *dest in
test_migrate() was not properly initialized like TestServer *s. Added
init_virtio_dev(dest) and uninit_virtio_dev(dest), so the fields are properly
set and when test_server_free(dest); is called, they can be correctly