mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +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)
|
void testXLFreeDriver(libxlDriverPrivatePtr driver)
|
||||||
{
|
{
|
||||||
virObjectUnref(driver->config->caps);
|
|
||||||
virObjectUnref(driver->config);
|
virObjectUnref(driver->config);
|
||||||
virObjectUnref(driver->xmlopt);
|
virObjectUnref(driver->xmlopt);
|
||||||
virMutexDestroy(&driver->lock);
|
virMutexDestroy(&driver->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user