summaryrefslogtreecommitdiff
path: root/src/libtpmtss/plugins/tpm/tpm_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtpmtss/plugins/tpm/tpm_plugin.c')
-rw-r--r--src/libtpmtss/plugins/tpm/tpm_plugin.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libtpmtss/plugins/tpm/tpm_plugin.c b/src/libtpmtss/plugins/tpm/tpm_plugin.c
index e98899852..a00f46ea2 100644
--- a/src/libtpmtss/plugins/tpm/tpm_plugin.c
+++ b/src/libtpmtss/plugins/tpm/tpm_plugin.c
@@ -18,6 +18,7 @@
#include "tpm_cert.h"
#include "tpm_rng.h"
+#include <tpm_tss.h>
#include <library.h>
typedef struct private_tpm_plugin_t private_tpm_plugin_t;
@@ -80,6 +81,7 @@ METHOD(plugin_t, destroy, void,
private_tpm_plugin_t *this)
{
free(this);
+ libtpmtss_deinit();
}
/*
@@ -89,6 +91,11 @@ plugin_t *tpm_plugin_create()
{
private_tpm_plugin_t *this;
+ if (!libtpmtss_init())
+ {
+ return NULL;
+ }
+
INIT(this,
.public = {
.plugin = {