mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
tpm-backend: Initialize and free data members in it's own methods
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to remove unneeded destroy() method from TpmDriverOps interface as TPMBackend is a Qemu Object, we can use object_unref() inplace of tpm_backend_destroy() to free the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
b19a5eea5a
commit
f35fe5cb97
4 changed files with 19 additions and 37 deletions
2
tpm.c
2
tpm.c
|
@ -157,7 +157,7 @@ void tpm_cleanup(void)
|
|||
|
||||
QLIST_FOREACH_SAFE(drv, &tpm_backends, list, next) {
|
||||
QLIST_REMOVE(drv, list);
|
||||
tpm_backend_destroy(drv);
|
||||
object_unref(OBJECT(drv));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue