mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_extdevice: Do cleanup host only for VIR_DOMAIN_TPM_TYPE_EMULATOR
We only set up host for VIR_DOMAIN_TPM_TYPE_EMULATOR and thus similarly, we should do cleanup for the same type. This also fixes a crasher, in which qemuTPMEmulatorCleanupHost() accesses tpm->data.emulator.storagepath which is NULL for VIR_DOMAIN_TPM_TYPE_EXTERNAL. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2168762 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a38ad6f687
commit
03f76e577d
@ -162,7 +162,10 @@ qemuExtDevicesCleanupHost(virQEMUDriver *driver,
|
||||
return;
|
||||
|
||||
for (i = 0; i < def->ntpms; i++) {
|
||||
qemuExtTPMCleanupHost(def->tpms[i], flags, outgoingMigration);
|
||||
virDomainTPMDef *tpm = def->tpms[i];
|
||||
|
||||
if (tpm->type == VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
||||
qemuExtTPMCleanupHost(tpm, flags, outgoingMigration);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user