xref: /aosp_15_r20/external/tpm2-tss/src/tss2-esys/esys_free.c (revision 758e9fba6fc9adbf15340f70c73baee7b168b1c9)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 #ifdef HAVE_CONFIG_H
3 #include <config.h>
4 #endif
5 
6 #include <stdlib.h>
7 
8 /*
9  * Esys_Free is a helper function that is a wrapper around free().
10  * This allows programs that are built using a different version
11  * of the C runtime to free memory that has been allocated by the
12  * esys library on Windows.
13  */
Esys_Free(void * __ptr)14 void Esys_Free(void *__ptr) {
15     if (__ptr != NULL) {
16         free(__ptr);
17     }
18 }
19