Add OOM error reporting to a few fucntions

They report errors in all other cases.
This commit is contained in:
Ján Tomko 2014-06-27 10:47:11 +02:00
parent e12b8000c8
commit c997e45408
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);