aboutsummaryrefslogtreecommitdiff
path: root/man/Tss2_TctiLdr_FreeInfo.3.in
blob: b11f0f20eca3924a62aaf922a25a921fb0dc0a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.TH Tss2_TctiLdr_FreeInfo 3 "JUNE 2019" "TPM2 Software Stack"
.SH NAME
Tss2_TctiLdr_FreeInfo \- Function to free a TSS2_TCTI_INFO structure
allocated by
.BR Tss2_TctiLdr_Initialize ().
.SH SYNOPSIS
.B #include <tss2/tss2_tctildr.h>
.sp
.sp
.BI "void Tss2_TctiLdr_FreeInfo (TSS2_TCTI_INFO" "*info" ");"
.sp
.SH DESCRIPTION
The
.BR Tss2_TctiLdr_FreeInfo ()
function destroys an instance of the TSS2_TCTI_INFO structure created by
the
.BR Tss2_TctiLdr_GetInfo ()
function.
.sp
The
.I info
parameter is a reference to the TSS2_TCTI_INFO structure to be freed.
.sp

.SH RETURN VALUE
This function returns no value.
.SH EXAMPLE
Example code.
.sp
.nf
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>

#include <tss2/tss2_tctildr.h>

TSS2_TCTI_INFO *info = NULL;
TSS2_RC rc = Tss2_TctiLdr_GetInfo (NULL, &info);
if (rc != TSS2_RC_SUCCESS) {
    fprintf (stderr, "Failed to get TSS2_TCTI_INFO structure for default "
             "TCTI with response code: 0x%" PRIx32 "\n", rc);
    exit (EXIT_FAILURE);
}

if (info != NULL) {
    Tss2_TctiLdr_FreeInfo (info);
    info = NULL;
}

exit (EXIT_SUCCESS);
.fi