diff --git a/tpm.c b/tpm.c index 3b8c7ed3b6..3122227156 100644 --- a/tpm.c +++ b/tpm.c @@ -172,7 +172,6 @@ int tpm_init(void) return -1; } - atexit(tpm_cleanup); return 0; } diff --git a/vl.c b/vl.c index d7c349233f..0723835bbf 100644 --- a/vl.c +++ b/vl.c @@ -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();