Can a call to
Freeing a NULL pointer cannot fail. And
free doesn't return any error, but freeing unallocated memory, already freed memory or the middle of an allocated block is undefined behaviour - it may cause a memory error and the program may abort (or worse, it will corrupt the heap structure and crash later).
Or, even worse than that, keep running but totally corrupt your data and write it to disk without you realising :-)
The relevant portion of the standard (C99) is section
void free(void *ptr);
freefunction causes the space pointed to by
ptrto be deallocated, that is, made available for further allocation. If
ptris a null pointer, no action occurs. Otherwise, if the argument does not match a pointer earlier returned by the
reallocfunction, or if the space has been deallocated by a call to
realloc, the behavior is undefined.
freefunction returns no value.