mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Fix reference leak in qemuDomainDefPostParse
The function gets a reference on virQEMUDriverConfig which needs to be released before returning. Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
cf32a69ae1
commit
0b224cce8b
@ -2134,13 +2134,13 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
||||
if (def->os.bootloader || def->os.bootloaderArgs) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("bootloader is not supported by QEMU"));
|
||||
return ret;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!def->os.machine) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("missing machine type"));
|
||||
return ret;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (def->os.loader &&
|
||||
@ -2155,7 +2155,7 @@ qemuDomainDefPostParse(virDomainDefPtr def,
|
||||
/* check for emulator and create a default one if needed */
|
||||
if (!def->emulator &&
|
||||
!(def->emulator = virDomainDefGetDefaultEmulator(def, caps)))
|
||||
return ret;
|
||||
goto cleanup;
|
||||
|
||||
if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache,
|
||||
def->emulator)))
|
||||
|
Loading…
Reference in New Issue
Block a user