Initialize the XML parser only once. There can be multiple threads running EnumerateInstances, thereforce any xmlInitParser() call must be outside of it. Multiple xmlInitParser() in different threads may clash, leading to hard to debug sigsegv.
View Diff