Commit 3b6b0a8a authored by Thomas Huth's avatar Thomas Huth
Browse files

tests/ide: Free pcibus when finishing a test



Once a test has finished, the pcibus structure should be freed, to
avoid leaking memory and to make sure that the structure is properly
re-initialized when the next test starts.

Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 61793a62
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -142,6 +142,10 @@ static void ide_test_start(const char *cmdline_fmt, ...)

static void ide_test_quit(void)
{
    if (pcibus) {
        qpci_free_pc(pcibus);
        pcibus = NULL;
    }
    pc_alloc_uninit(guest_malloc);
    guest_malloc = NULL;
    qtest_end();