Re: [PATCH] qemu: fix miss goto cleanup in qemuDomainAttachNetDevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.01.2015 10:20, Luyao Huang wrote:
This place have a wrong logic, maybe forget goto cleanup.
Also fix some small things.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
I am not sure i am right, but hotplug a net do not a address
may cause a issue.

  src/qemu/qemu_hotplug.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5d0d8e0..bfe1bd0 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -924,7 +924,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,

      /* Set device online immediately */
      if (qemuInterfaceStartDevice(net) < 0)
-       goto cleanup;
+        goto cleanup;

      /* Set Bandwidth */
      if (virNetDevSupportBandwidth(actualType) &&
@@ -952,7 +952,8 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
              goto cleanup;
      } else if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VIRTIO_S390)) {
          virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                        _("virtio-s390 net device cannot be hotplugged."));
+                       _("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;



ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]