]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_extdevice: Do cleanup host only for VIR_DOMAIN_TPM_TYPE_EMULATOR
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Feb 2023 08:47:05 +0000 (09:47 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 Feb 2023 09:49:13 +0000 (10:49 +0100)
commit03f76e577d66f8eea6aa7cc513e75026527b4cda
tree823b8aa2170bc89f86bba21281b362c5a80270a4
parenta38ad6f68740a8a7980dcef050e5e3fef2437af5
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>
src/qemu/qemu_extdevice.c