aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm/tpm_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/tpm/tpm_util.c')
-rw-r--r--hw/tpm/tpm_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
index 17cafbe6b3..747075e244 100644
--- a/hw/tpm/tpm_util.c
+++ b/hw/tpm/tpm_util.c
@@ -355,3 +355,10 @@ int tpm_util_get_buffer_size(int tpm_fd, TPMVersion tpm_version,
return 0;
}
+
+void tpm_sized_buffer_reset(TPMSizedBuffer *tsb)
+{
+ g_free(tsb->buffer);
+ tsb->buffer = NULL;
+ tsb->size = 0;
+}