diff mbox

[01/17] qemu: domain: Consistently use goto in PostParse

Message ID 8cc6146296b02fb16d16bbf692474472836607e7.1453489951.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson Jan. 22, 2016, 7:30 p.m. UTC
Isn't strictly required, but I have upcoming patches in here and it's
just easier to be consistent.
---
 src/qemu/qemu_domain.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.5.0

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

Patch

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 0fa2dbe..9b456e8 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1248,13 +1248,13 @@  qemuDomainDefPostParse(virDomainDefPtr def,
     if (def->os.bootloader || def->os.bootloaderArgs) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("bootloader is not supported by QEMU"));
-        return ret;
+        goto cleanup;
     }
 
     /* check for emulator and create a default one if needed */
     if (!def->emulator &&
         !(def->emulator = virDomainDefGetDefaultEmulator(def, caps)))
-        return ret;
+        goto cleanup;
 
     if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache,
                                             def->emulator)))