提交 5656d9bb 编写于 作者: J Ján Tomko

Remove double OOM error reporting

上级 fb11f5b1
...@@ -3983,11 +3983,12 @@ libxlDomainGetNumaParameters(virDomainPtr dom, ...@@ -3983,11 +3983,12 @@ libxlDomainGetNumaParameters(virDomainPtr dom,
if (numnodes <= 0) if (numnodes <= 0)
goto cleanup; goto cleanup;
if (libxl_node_bitmap_alloc(priv->ctx, &nodemap, 0) || if (libxl_node_bitmap_alloc(priv->ctx, &nodemap, 0)) {
!(nodes = virBitmapNew(numnodes))) {
virReportOOMError(); virReportOOMError();
goto cleanup; goto cleanup;
} }
if (!(nodes = virBitmapNew(numnodes)))
goto cleanup;
rc = libxl_domain_get_nodeaffinity(priv->ctx, rc = libxl_domain_get_nodeaffinity(priv->ctx,
vm->def->id, vm->def->id,
......
...@@ -9113,10 +9113,8 @@ qemuBuildParallelChrDeviceStr(char **deviceStr, ...@@ -9113,10 +9113,8 @@ qemuBuildParallelChrDeviceStr(char **deviceStr,
virDomainChrDefPtr chr) virDomainChrDefPtr chr)
{ {
if (virAsprintf(deviceStr, "isa-parallel,chardev=char%s,id=%s", if (virAsprintf(deviceStr, "isa-parallel,chardev=char%s,id=%s",
chr->info.alias, chr->info.alias) < 0) { chr->info.alias, chr->info.alias) < 0)
virReportOOMError();
return -1; return -1;
}
return 0; return 0;
} }
...@@ -9139,10 +9137,8 @@ qemuBuildChannelChrDeviceStr(char **deviceStr, ...@@ -9139,10 +9137,8 @@ qemuBuildChannelChrDeviceStr(char **deviceStr,
if (virAsprintf(deviceStr, if (virAsprintf(deviceStr,
"user,guestfwd=tcp:%s:%i-chardev:char%s,id=user-%s", "user,guestfwd=tcp:%s:%i-chardev:char%s,id=user-%s",
addr, port, chr->info.alias, chr->info.alias) < 0) { addr, port, chr->info.alias, chr->info.alias) < 0)
virReportOOMError();
goto cleanup; goto cleanup;
}
break; break;
case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO: case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO:
......
...@@ -1450,10 +1450,8 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver, ...@@ -1450,10 +1450,8 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0) if (qemuBuildChrDeviceStr(&devstr, vm->def, chr, priv->qemuCaps) < 0)
return ret; return ret;
if (virAsprintf(&charAlias, "char%s", chr->info.alias) < 0) { if (virAsprintf(&charAlias, "char%s", chr->info.alias) < 0)
virReportOOMError();
goto cleanup; goto cleanup;
}
if (qemuDomainChrInsert(vmdef, chr) < 0) if (qemuDomainChrInsert(vmdef, chr) < 0)
goto cleanup; goto cleanup;
......
...@@ -120,7 +120,7 @@ virURIParseParams(virURIPtr uri) ...@@ -120,7 +120,7 @@ virURIParseParams(virURIPtr uri)
if (virURIParamAppend(uri, name, value ? value : "") < 0) { if (virURIParamAppend(uri, name, value ? value : "") < 0) {
VIR_FREE(name); VIR_FREE(name);
VIR_FREE(value); VIR_FREE(value);
goto no_memory; return -1;
} }
VIR_FREE(name); VIR_FREE(name);
VIR_FREE(value); VIR_FREE(value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册