Skip to content

Commit

Permalink
tpm: Move tpm_cleanup() to right place
Browse files Browse the repository at this point in the history
As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.

Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
  • Loading branch information
avalluri authored and stefanberger committed Oct 13, 2017
1 parent f4ede81 commit c37caca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion tpm.c
Expand Up @@ -172,7 +172,6 @@ int tpm_init(void)
return -1;
}

atexit(tpm_cleanup);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions vl.c
Expand Up @@ -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();
Expand Down

0 comments on commit c37caca

Please sign in to comment.