• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*******************************************************************************
3  * Copyright 2018-2019, Fraunhofer SIT sponsored by Infineon Technologies AG
4  * All rights reserved.
5  ******************************************************************************/
6 
7 #ifdef HAVE_CONFIG_H
8 #include <config.h>
9 #endif
10 
11 #include <stdlib.h>
12 
13 /** Frees a FAPI allocated return buffer.
14  *
15  * Fapi_Free is a helper function that is a wrapper around free().
16  * This allows programs that are built using a different version
17  * of the C runtime to free memory that has been allocated by the
18  * esys library on Windows.
19  *
20  * @param[in] ptr A pointer to the object that is to be freed.
21  */
22 void
Fapi_Free(void * ptr)23 Fapi_Free(void *ptr)
24 {
25     if (ptr != NULL) {
26         free(ptr);
27     }
28 }
29