mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
virhostdevtest: Don't leak @mgr->activeSCSIHostdevs
So the hostdev manager has some lists to keep track which devices are active (=assigned to a domain) or inactive. The manager and its lists are allocated in myInit and freed in myCleanup but one of them (activeSCSIHostdevs) was missing. Also, the order in which the cleanup was done doesn't make it easy to spot it, therefore reoder it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1fe68b2e73
commit
e02b5722ed
@ -73,8 +73,9 @@ myCleanup(void)
|
||||
virFileDeleteTree(mgr->stateDir);
|
||||
|
||||
virObjectUnref(mgr->activePCIHostdevs);
|
||||
virObjectUnref(mgr->inactivePCIHostdevs);
|
||||
virObjectUnref(mgr->activeUSBHostdevs);
|
||||
virObjectUnref(mgr->inactivePCIHostdevs);
|
||||
virObjectUnref(mgr->activeSCSIHostdevs);
|
||||
VIR_FREE(mgr->stateDir);
|
||||
VIR_FREE(mgr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user