Synopsis
#include <stdlib.h>
void free(void *ptr);
Description

free causes the space pointed to by ptr to be deallocated, that is, made available for further allocation. If ptr is a null pointer, no action occurs.

Notes

If ptr does not match a pointer earlier returned by calloc, malloc, or realloc, or if the space has been deallocated by a call to free or realloc, the behaviour is undefined.

Portability

free conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).