提交 921d2225 编写于 作者: P Paolo Bonzini 提交者: Daniel Veillard

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