mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Remove possible NULL deref in debug output
Check for !dev->info.alias was done after a VIR_DEBUG() statement that already tried to print - just flip sequence
This commit is contained in:
parent
99186c4103
commit
b7890a8c28
@ -1887,14 +1887,14 @@ int qemuDomainChangeNetLinkState(virQEMUDriverPtr driver,
|
||||
int ret = -1;
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
|
||||
VIR_DEBUG("dev: %s, state: %d", dev->info.alias, linkstate);
|
||||
|
||||
if (!dev->info.alias) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("can't change link state: device alias not found"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
VIR_DEBUG("dev: %s, state: %d", dev->info.alias, linkstate);
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
||||
ret = qemuMonitorSetLink(priv->mon, dev->info.alias, linkstate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user