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>
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;