}
/* Allocate per-connection private data */
- if (VIR_ALLOC(priv) < 0) {
- virReportOOMError();
+ if (VIR_ALLOC(priv) < 0)
goto cleanup;
- }
if (hypervParseUri(&priv->parsedUri, conn->uri) < 0) {
goto cleanup;
/* Flags checked by virDomainDefFormat */
- if (VIR_ALLOC(def) < 0) {
- virReportOOMError();
+ if (VIR_ALLOC(def) < 0)
goto cleanup;
- }
virUUIDFormat(domain->uuid, uuid_string);
!MATCH(VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART)) ||
(MATCH(VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT) &&
!MATCH(VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT))) {
- if (domains &&
- VIR_ALLOC_N(*domains, 1) < 0)
- goto no_memory;
+ if (domains && VIR_ALLOC_N(*domains, 1) < 0)
+ goto cleanup;
ret = 0;
goto cleanup;
if (domains) {
if (VIR_ALLOC_N(doms, 1) < 0)
- goto no_memory;
+ goto cleanup;
ndoms = 1;
}
}
if (VIR_RESIZE_N(doms, ndoms, count, 2) < 0)
- goto no_memory;
+ goto cleanup;
domain = NULL;
hypervFreeObject(priv, (hypervObject *)computerSystemList);
return ret;
-
-no_memory:
- virReportOOMError();
- goto cleanup;
}
#undef MATCH
return -1;
}
- if (VIR_ALLOC(*parsedUri) < 0) {
- virReportOOMError();
+ if (VIR_ALLOC(*parsedUri) < 0)
return -1;
- }
for (i = 0; i < uri->paramsCount; i++) {
virURIParamPtr queryParam = &uri->params[i];
goto cleanup;
}
- if (VIR_ALLOC(object) < 0) {
- virReportOOMError();
+ if (VIR_ALLOC(object) < 0)
goto cleanup;
- }
object->serializerInfo = serializerInfo;
object->data = data;
if (virAsprintf(&selector, "Name=%s&CreationClassName=Msvm_ComputerSystem",
uuid_string) < 0 ||
- virAsprintf(&properties, "RequestedState=%d", requestedState) < 0) {
- virReportOOMError();
+ virAsprintf(&properties, "RequestedState=%d", requestedState) < 0)
goto cleanup;
- }
options = wsmc_options_init();