Moved myrealloc() to where it can be seen by the parent function.