tests: fix q35-test leaks
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 27 Jan 2017 09:06:58 +0000 (13:06 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 1 Mar 2017 07:50:33 +0000 (11:50 +0400)
Spotted by ASAN.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/q35-test.c

index 763fe3d6ae24a3bd53df2ddd5c9d90f1c3c8de08..cc58f3ecf4916859c832b587c4424c3b54b8a911 100644 (file)
@@ -71,6 +71,9 @@ static void test_smram_lock(void)
     g_assert(smram_test_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN) == false);
     smram_set_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN, true);
     g_assert(smram_test_bit(pcidev, MCH_HOST_BRIDGE_SMRAM_D_OPEN) == true);
+
+    g_free(pcidev);
+    qpci_free_pc(pcibus);
 }
 
 int main(int argc, char **argv)