diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ee651e774276ba09bed759beb663de037aec8920..c69d382d70c088d61260751d8249029ee47f7e06 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -30415,7 +30415,11 @@ virDomainNetDefToNetworkPort(virDomainDefPtr dom, if (VIR_ALLOC(port) < 0) return NULL; - virUUIDGenerate(port->uuid); + if (virUUIDGenerate(port->uuid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Failed to generate UUID")); + goto error; + } memcpy(port->owneruuid, dom->uuid, VIR_UUID_BUFLEN); if (VIR_STRDUP(port->ownername, dom->name) < 0) @@ -30576,7 +30580,11 @@ virDomainNetDefActualToNetworkPort(virDomainDefPtr dom, return NULL; /* Bad - we need to preserve original port uuid */ - virUUIDGenerate(port->uuid); + if (virUUIDGenerate(port->uuid) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + "%s", _("Failed to generate UUID")); + goto error; + } memcpy(port->owneruuid, dom->uuid, VIR_UUID_BUFLEN); if (VIR_STRDUP(port->ownername, dom->name) < 0)