qemu: fix miss goto cleanup in qemuDomainAttachNetDevice

This place have a wrong logic, maybe forget goto cleanup.
Also fix some small things.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
Luyao Huang 2015-01-06 17:20:30 +08:00 committed by Michal Privoznik
parent 18ec863d19
commit a791599cc6

View File

@ -953,6 +953,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
} else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_S390)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("virtio-s390 net device cannot be hotplugged."));
goto cleanup;
} else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE) &&
virDomainPCIAddressEnsureAddr(priv->pciaddrs, &net->info) < 0) {
goto cleanup;