提交 ab55a8a0 编写于 作者: L Liao Pingfang 提交者: Michal Privoznik

qemu: hotplug: Fix the condition check for net->downscript

According to the context, here we are checking net->downscript's validity,
Signed-off-by: NLiao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 f6c79ca2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册