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

Add OOM error reporting to a few fucntions

They report errors in all other cases.
上级 e12b8000
......@@ -223,7 +223,7 @@ static virCommandPtr lxcContainerBuildInitCmd(virDomainDefPtr vmDef,
}
virBufferTrim(&buf, NULL, 1);
if (virBufferError(&buf))
if (virBufferCheckError(&buf) < 0)
return NULL;
virUUIDFormat(vmDef->uuid, uuidstr);
......
......@@ -2686,7 +2686,7 @@ virQEMUCapsSaveCache(virQEMUCapsPtr qemuCaps, const char *filename)
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</qemuCaps>\n");
if (virBufferError(&buf))
if (virBufferCheckError(&buf) < 0)
goto cleanup;
xml = virBufferContentAndReset(&buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册