]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu migration: avoid NULL-deref given an invalid input
authorJim Meyering <meyering@redhat.com>
Mon, 14 Dec 2009 16:02:56 +0000 (17:02 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 15 Dec 2009 10:26:24 +0000 (11:26 +0100)
* src/qemu/qemu_driver.c (doNonTunnelMigrate): Don't let a
NULL "uri_out" provoke a NULL-dereference in doNativeMigrate:
supply omitted goto-after-qemudReportError.

src/qemu/qemu_driver.c

index c782f0dab913fa74bf862d1e77b18b3a9a61716b..9ef6c35d3e9f69fbec71099fbac2f33ba92ce53a 100644 (file)
@@ -7430,6 +7430,7 @@ static int doNonTunnelMigrate(virDomainPtr dom,
     if (uri_out == NULL) {
         qemudReportError(NULL, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s",
                          _("domainMigratePrepare2 did not set uri"));
+        goto cleanup;
     }
 
     if (doNativeMigrate(dom, driver, vm, uri_out, flags, dname, resource) < 0)