mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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) {
|
if (boot_nparams > 0) {
|
||||||
virCommandAddArg(cmd, "-boot");
|
virCommandAddArg(cmd, "-boot");
|
||||||
|
|
||||||
|
if (virBufferError(&boot_buf)) {
|
||||||
|
virReportOOMError();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
if (boot_nparams < 2 || emitBootindex) {
|
if (boot_nparams < 2 || emitBootindex) {
|
||||||
virCommandAddArgBuffer(cmd, &boot_buf);
|
virCommandAddArgBuffer(cmd, &boot_buf);
|
||||||
virBufferFreeAndReset(&boot_buf);
|
virBufferFreeAndReset(&boot_buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user