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

Remove double OOM error reporting

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