Well, there are many strange conditions allowed for in the C++ standard.
http://www.cplusplus.com/reference/clibrary/cstdlib/realloc/[
^]
but I wouldn't recommend adopting them as a coding style.
For example, you are allowed to free() a NULL pointer.
You can realloc() a NULL pointer and realloc() then acts as malloc()
You can realloc() a non-NULL pointer but specify the size as 0 so realloc() then acts as free()
They are allowed but if you decide to use those quirks instead of making reasonable calls to the usually library functions, you will end up causing lots of problems for anyone who tries to follow / modify your code in the future.
"Tricks are for Kids" (tm) Real Programmers write readable and maintainable code.