From: Marc-André Lureau Date: Mon, 6 Feb 2017 08:51:28 +0000 (+0000) Subject: tests: fix i440fx-test leaks X-Git-Tag: v2.9.0-rc0~42^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bab33ab4ab4702f53012551cad333beb270f30d;p=thirdparty%2Fqemu.git tests: fix i440fx-test leaks Spotted by ASAN. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index da2d5a53f01..e9d05c87d18 100644 --- a/tests/i440fx-test.c +++ b/tests/i440fx-test.c @@ -134,6 +134,8 @@ static void test_i440fx_defaults(gconstpointer opaque) /* 3.2.26 */ g_assert_cmpint(qpci_config_readb(dev, 0x93), ==, 0x00); /* TRC */ + g_free(dev); + qpci_free_pc(bus); qtest_end(); } @@ -270,6 +272,9 @@ static void test_i440fx_pam(gconstpointer opaque) /* Verify the area is not our new mask */ g_assert(!verify_area(pam_area[i].start, pam_area[i].end, 0x82)); } + + g_free(dev); + qpci_free_pc(bus); qtest_end(); }