[libvirt] [PATCH] qemuDomainRename: Don't leave a domain locked uppon fail

Michal Privoznik mprivozn at redhat.com
Tue Aug 18 18:49:05 UTC 2015


Well, yet again one case of 'goto cleanup' while 'goto endjob'
was needed. Sorry.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---

Pushed as trivial.

 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 180dd88..99a3817 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -19943,7 +19943,7 @@ static int qemuDomainRename(virDomainPtr dom,
     if (STREQ(vm->def->name, new_name)) {
         virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                        _("Can't rename domain to itself"));
-        goto cleanup;
+        goto endjob;
     }
 
     if (VIR_STRDUP(new_dom_name, new_name) < 0)
-- 
2.4.6




More information about the libvir-list mailing list