Cognizant interview question

Free a memory using realloc.