mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-20 11:48:28 -06:00
Fix possible NULL pointer dereference
If there are no references remaining to the object, vm is set to NULL and vm->persistent cannot be accessed. Fixed by this trivial patch. * src/qemu/qemu_driver.c (qemudDomainCoreDump): Avoid possible NULL pointer dereference on --crash dump.
This commit is contained in:
parent
ad905a195e
commit
921d2225ba
@ -3914,7 +3914,7 @@ endjob:
|
||||
|
||||
if (qemuDomainObjEndJob(vm) == 0)
|
||||
vm = NULL;
|
||||
if ((ret == 0) && (flags & VIR_DUMP_CRASH) && !vm->persistent) {
|
||||
else if ((ret == 0) && (flags & VIR_DUMP_CRASH) && !vm->persistent) {
|
||||
virDomainRemoveInactive(&driver->domains,
|
||||
vm);
|
||||
vm = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user