mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: hotplug: Fix the condition check for net->downscript
According to the context, here we are checking net->downscript's validity, Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f6c79ca2af
commit
ab55a8a087
@ -4673,8 +4673,8 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver,
|
||||
else
|
||||
VIR_WARN("Unable to release network device '%s'", NULLSTR(net->ifname));
|
||||
} else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET) {
|
||||
if (net->script)
|
||||
virNetDevRunEthernetScript(net->ifname, net->downscript);
|
||||
if (net->downscript)
|
||||
virNetDevRunEthernetScript(net->ifname, net->downscript);
|
||||
}
|
||||
virDomainNetDefFree(net);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user