]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
umlAutostartDomain: avoid NULL-deref upon virGetLastError failure
authorJim Meyering <meyering@redhat.com>
Mon, 17 May 2010 12:38:14 +0000 (14:38 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 17 May 2010 16:49:36 +0000 (18:49 +0200)
* src/uml/uml_driver.c (umlAutostartDomain): Handle a NULL return
from virGetLastError.

src/uml/uml_driver.c

index 63fe808d0974588699cbdec07e58e0b929dea906..ffb87c8b511020a1f9e0aedc90cfa0020f663196 100644 (file)
@@ -157,7 +157,7 @@ umlAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaqu
         if (umlStartVMDaemon(data->conn, data->driver, vm) < 0) {
             virErrorPtr err = virGetLastError();
             VIR_ERROR(_("Failed to autostart VM '%s': %s"),
-                      vm->def->name, err->message);
+                      vm->def->name, err ? err->message : "");
         }
     }
     virDomainObjUnlock(vm);