[PATCH 2/5] testutilsxen: Avoid double free of driver caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux