> 
> **Possible Duplicate:**  
> 
> [Malloc thread-safe?](https://stackoverflow.com/questions/855763/malloc-thread-safe) 
> 
> 
> 

I heard that glibc malloc() was not thread safe, since several threads of a process calling malloc() simultaneously will lead to undefined behaviour. And my question is if a thread calls free() will another thread is calling malloc(), will this lead to undefined behaviour as well?