提交 a4b0c75c 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 de87497f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册