From: Michal Privoznik Date: Fri, 4 Aug 2017 13:25:40 +0000 (+0200) Subject: qemuhotplugtest: Don't leak @vm X-Git-Tag: v3.7.0-rc1~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9bc41f740ca7494d9aa6826f19172fefc1a1663;p=thirdparty%2Flibvirt.git qemuhotplugtest: Don't leak @vm Some tests take already prepared domain from previous tests. In this case, the domain is freed by the first test that doesn't keep the domain. However, if there's no such test case domain is leaked. Signed-off-by: Michal Privoznik --- diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 79f0326905..23a498617a 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -855,6 +855,7 @@ mymain(void) DO_TEST_CPU_INDIVIDUAL("ppc64-modern-individual", "17", true, true, true); qemuTestDriverFree(&driver); + virObjectUnref(data.vm); return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; }