I read somewhere that it is disastrous to use free to get rid of an object not created by calling malloc, is this true? why?
free
malloc
It is undefined behaviour. And logically, if behaviour is undefined, you cannot be sure what has happened, and if the program is still operating properly.