mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
tests: Don't leak cpu defs
There are cpu definitions that are allocated in qemuTestDriverInit() but are missing corresponding virCPUDefFree() call in qemuTestDriverFree(). It's safe to call the free function because the definitions contain a refcounter and thus even if they were still in use the refcounter would be just decreased. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ca4f9e403f
commit
73890139bf
@ -332,6 +332,11 @@ void qemuTestDriverFree(virQEMUDriver *driver)
|
||||
virObjectUnref(driver->caps);
|
||||
virObjectUnref(driver->config);
|
||||
virObjectUnref(driver->securityManager);
|
||||
|
||||
virCPUDefFree(cpuDefault);
|
||||
virCPUDefFree(cpuHaswell);
|
||||
virCPUDefFree(cpuPower8);
|
||||
virCPUDefFree(cpuPower9);
|
||||
}
|
||||
|
||||
int qemuTestCapsCacheInsert(virFileCache *cache,
|
||||
|
Loading…
Reference in New Issue
Block a user