And he didn't get all the details right.
realloc(valid_pointer,0);
IS defined (in C89 no less) to act like free(). It is NOT operating system dependent.