Commit c37cacab authored by Amarnath Valluri's avatar Amarnath Valluri Committed by Stefan Berger

tpm: Move tpm_cleanup() to right place

As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.
Signed-off-by: 's avatarAmarnath Valluri <amarnath.valluri@intel.com>
Reviewed-by: 's avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: 's avatarStefan Berger <stefanb@linux.vnet.ibm.com>
parent f4ede81e
......@@ -172,7 +172,6 @@ int tpm_init(void)
return -1;
}
atexit(tpm_cleanup);
return 0;
}
......
......@@ -4905,6 +4905,7 @@ int main(int argc, char **argv, char **envp)
res_free();
/* vhost-user must be cleaned up before chardevs. */
tpm_cleanup();
net_cleanup();
audio_cleanup();
monitor_cleanup();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment