Add missing check for OOM when building boot menu args

When building boot menu args, if OOM occurred the CLI args
would end up containing  'order=(null)' due to a missing
call to 'virBufferError'.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2013-09-23 15:11:19 +01:00
parent de87497fd1
commit a4b0c75ce8

View File

@ -8057,6 +8057,11 @@ qemuBuildCommandLine(virConnectPtr conn,
if (boot_nparams > 0) {
virCommandAddArg(cmd, "-boot");
if (virBufferError(&boot_buf)) {
virReportOOMError();
goto error;
}
if (boot_nparams < 2 || emitBootindex) {
virCommandAddArgBuffer(cmd, &boot_buf);
virBufferFreeAndReset(&boot_buf);