mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
87d80b50c6
commit
3087b27cff
@ -133,6 +133,9 @@ virDomainConfNWFilterTeardownImpl(virConnectPtr conn,
|
||||
{
|
||||
virNWFilterBindingPtr binding;
|
||||
|
||||
if (!net->ifname)
|
||||
return;
|
||||
|
||||
binding = virNWFilterBindingLookupByPortDev(conn, net->ifname);
|
||||
if (!binding)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user