提交 3087b27c 编写于 作者: M Michal Privoznik

domain_nwfilter: Return early if net has no name in virDomainConfNWFilterTeardownImpl

This function is called from various clean up paths (e.g.
from qemuBuildInterfaceCommandLine). However, depending on the
stage the interface creation process failed at, net->ifname might
still be not filled in when control jumps to cleanup label. If
that is the case return early (avoiding useless error message
produced in virNWFilterBindingLookupByPortDev) as there is no
NWFilter to tear down anyway.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 87d80b50
......@@ -133,6 +133,9 @@ virDomainConfNWFilterTeardownImpl(virConnectPtr conn,
{
virNWFilterBindingPtr binding;
if (!net->ifname)
return;
binding = virNWFilterBindingLookupByPortDev(conn, net->ifname);
if (!binding)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册