In testXLInitDriver() a dummy driver structure is filled and it is freed later in testXLFreeDriver(). However, it is sufficient to unref just driver->config because that results in libxlDriverConfigDispose() being called which unrefs driver->config->caps. There is no need to unref it again in testXLFreeDriver() - in fact it's undesired. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- tests/testutilsxen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c index 75cd42ec43..b73c79581d 100644 --- a/tests/testutilsxen.c +++ b/tests/testutilsxen.c @@ -105,7 +105,6 @@ libxlDriverPrivatePtr testXLInitDriver(void) void testXLFreeDriver(libxlDriverPrivatePtr driver) { - virObjectUnref(driver->config->caps); virObjectUnref(driver->config); virObjectUnref(driver->xmlopt); virMutexDestroy(&driver->lock); -- 2.24.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list