qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v3 10/11] tpm: Move tpm_cleanup() to right place


From: Stefan Berger
Subject: [Qemu-devel] [PULL v3 10/11] tpm: Move tpm_cleanup() to right place
Date: Fri, 13 Oct 2017 07:44:59 -0400

From: Amarnath Valluri <address@hidden>

As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.

Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
---
 tpm.c | 1 -
 vl.c  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/tpm.c b/tpm.c
index 3b8c7ed..3122227 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 d7c3492..0723835 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();
-- 
2.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]