mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
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:
parent
de87497fd1
commit
a4b0c75ce8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user