[libvirt] [PATCH 15/20] Add missing 'goto error' in QEMU command line building

Daniel P. Berrange berrange at redhat.com
Tue Sep 11 14:11:23 UTC 2012


From: "Daniel P. Berrange" <berrange at redhat.com>

If reporting case of a binary not supporting KVM or kQEMU, libvirt
forgot to jump to the error branch for cleanup
---
 src/qemu/qemu_command.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 2be6aa8..3290de0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4340,6 +4340,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("the QEMU binary %s does not support kqemu"),
                            emulator);
+            goto error;
         }
         break;
 
@@ -4353,6 +4354,7 @@ qemuBuildCommandLine(virConnectPtr conn,
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("the QEMU binary %s does not support kvm"),
                            emulator);
+            goto error;
         }
         break;
 
-- 
1.7.11.4




More information about the libvir-list mailing list