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