mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
testutilsxen: Avoid double free of driver caps
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@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
08a7e88b6f
commit
98f1f4a439
@ -105,7 +105,6 @@ libxlDriverPrivatePtr testXLInitDriver(void)
|
||||
|
||||
void testXLFreeDriver(libxlDriverPrivatePtr driver)
|
||||
{
|
||||
virObjectUnref(driver->config->caps);
|
||||
virObjectUnref(driver->config);
|
||||
virObjectUnref(driver->xmlopt);
|
||||
virMutexDestroy(&driver->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user