From: Marc-André Lureau Date: Fri, 27 Jan 2017 09:06:58 +0000 (+0400) Subject: tests: fix q35-test leaks X-Git-Tag: v2.9.0-rc0~42^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb6faea888c1e54059aed7f87be93de623b346ee;p=thirdparty%2Fqemu.git tests: fix q35-test leaks Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- diff --git a/tests/q35-test.c b/tests/q35-test.c index 763fe3d6ae2..cc58f3ecf49 100644 --- a/tests/q35-test.c +++ b/tests/q35-test.c @@ -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)