From: Jim Meyering Date: Mon, 17 May 2010 12:38:14 +0000 (+0200) Subject: umlAutostartDomain: avoid NULL-deref upon virGetLastError failure X-Git-Tag: v0.8.2~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e8bda261473bea884ec84fc494b3bad0d76dbc1;p=thirdparty%2Flibvirt.git umlAutostartDomain: avoid NULL-deref upon virGetLastError failure * src/uml/uml_driver.c (umlAutostartDomain): Handle a NULL return from virGetLastError. --- diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 63fe808d09..ffb87c8b51 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -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);