c/memory/free

Deallocates the space previously allocated by malloc, calloc or realloc.

If is a null pointer, the function does nothing.

The behavior is undefined if the value of does not equal a value returned earlier by malloc, calloc, realloc.

The behavior is undefined if the memory area referred to by has already been deallocated, that is,, or realloc has already been called with  as the argument and no calls to malloc, calloc, realloc resulted in a pointer equal to  afterwards.

The behavior is undefined if after returns, an access is made through the pointer  (unless another allocation function happened to result in a pointer value equal to ).

Return value
(none)