qemu_driver.c: do not redefine 'event' in qemuDomainDefineXMLFlags()

A bad merge while rebasing 74b2834333 caused the @event variable
to be defined twice, inside the 'cleanup' label, causing coverity
errors.

This code was originally moved outside of the label by commit
773c7c4361. Delete the unintended code in the 'cleanup'
label.

Fixes: 74b2834333
Reported-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
Daniel Henrique Barboza 2020-11-13 14:46:49 -03:00
parent 045ecbeec6
commit c441f60be8
1 changed files with 0 additions and 9 deletions

View File

@ -6748,15 +6748,6 @@ qemuDomainDefineXMLFlags(virConnectPtr conn,
}
}
event = virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_DEFINED,
!oldDef ?
VIR_DOMAIN_EVENT_DEFINED_ADDED :
VIR_DOMAIN_EVENT_DEFINED_UPDATED);
VIR_INFO("Creating domain '%s'", vm->def->name);
dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id);
virDomainObjEndAPI(&vm);
virObjectEventStateQueue(driver->domainEventState, event);
return dom;