提交 e02b5722 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
上级 1fe68b2e
...@@ -73,8 +73,9 @@ myCleanup(void) ...@@ -73,8 +73,9 @@ myCleanup(void)
virFileDeleteTree(mgr->stateDir); virFileDeleteTree(mgr->stateDir);
virObjectUnref(mgr->activePCIHostdevs); virObjectUnref(mgr->activePCIHostdevs);
virObjectUnref(mgr->inactivePCIHostdevs);
virObjectUnref(mgr->activeUSBHostdevs); virObjectUnref(mgr->activeUSBHostdevs);
virObjectUnref(mgr->inactivePCIHostdevs);
virObjectUnref(mgr->activeSCSIHostdevs);
VIR_FREE(mgr->stateDir); VIR_FREE(mgr->stateDir);
VIR_FREE(mgr); VIR_FREE(mgr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册