O2S C Library
1.8.2
Provide high-level data-structures and other fundamental tools for C projects
Loading...
Searching...
No Matches
cleanup.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* ____ _ _____ ____ _ _ _ _____ _ _ ____ ____ */
3
/* / ___| / \ | ___| _ \ / \ | \ | | |_ _| || | | _ \/ ___| */
4
/* \___ \ / _ \ | |_ | |_) | / _ \ | \| | | | | || |_| | | \___ \ */
5
/* ___) / ___ \| _| | _ < / ___ \| |\ | | | |__ _| |_| |___) | */
6
/* |____/_/ \_|_| |_| \_/_/ \_|_| \_| |_| |_| |____/|____/ */
7
/* */
14
/* ************************************************************************** */
15
16
#include "
o2s/cleanup.h
"
17
18
#include <stdlib.h>
// free
19
23
void
cleanup_allocated_memory
(
void
** address)
24
{
25
if
(*address)
26
free(*address);
27
}
cleanup_allocated_memory
void cleanup_allocated_memory(void **address)
Given the address of a pointer, this pointer is passed to free if its value is not NULL.
Definition
cleanup.c:23
cleanup.h
Functions to be used with the cleanup attribute.
src
cleanup.c
Generated on
for O2S C Library by
1.14.0