Zitat:
In case that the size is 0, the memory previously allocated in ptr is deallocated as if a call to free was made, and a NULL pointer is returned.
If the function failed to allocate the requested block of memory, a NULL pointer is returned.
Vll. liegts daran