requested to merge ddkilzer/libxml2:bug-2-xmlInitGlobals-is-not-thread-safe into master
If xmlInitGlobals() is called from two different threads before
xmlThrDefMutex is initialized, a race could occur where a
pthread_mutex_t created by xmlNewMutex() was leaked, and (worse)
one thread might use the wrong (leaked) mutex, thus causing
thread safety issues.
The fix is to add proper locking to make sure
is initialized exactly once.