edu: fix memory leak on msi_broken platforms
commitc25a67f0c3d0c86231f9653267a222c4effa706f
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 31 May 2017 12:56:37 +0000 (31 14:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 7 Jun 2017 16:22:02 +0000 (7 18:22 +0200)
tree086fd41ae8e9c7501863047737b4658810222d6d
parent7e018385103cd7a571b9ea0d6f994af6b1129fe7
edu: fix memory leak on msi_broken platforms

If msi_init fails, the thread has already been created and the
mutex/condvar are not destroyed.  Initialize everything only
after the point where pci_edu_realize cannot fail.

Reported-by: Markus Armbruster <armbru@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/misc/edu.c