]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuhotplugtest: Don't leak @vm
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Aug 2017 13:25:40 +0000 (15:25 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Aug 2017 08:44:06 +0000 (10:44 +0200)
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 <mprivozn@redhat.com>
tests/qemuhotplugtest.c

index 79f0326905fc125a26039c22312ef584b2d94855..23a498617a765119ca54f2f32d45bb4fb0a54264 100644 (file)
@@ -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;
 }