| Index: third_party/libxml/src/xmlmemory.c
|
| diff --git a/third_party/libxml/src/xmlmemory.c b/third_party/libxml/src/xmlmemory.c
|
| index a3dc737fe098c82f55c48742bcd19c3c4c81f7af..f24fd6d4fff841241e6b65c5bc7890cb82910a7f 100644
|
| --- a/third_party/libxml/src/xmlmemory.c
|
| +++ b/third_party/libxml/src/xmlmemory.c
|
| @@ -554,7 +554,12 @@ xmlMemoryStrdup(const char *str) {
|
|
|
| int
|
| xmlMemUsed(void) {
|
| - return(debugMemSize);
|
| + int res;
|
| +
|
| + xmlMutexLock(xmlMemMutex);
|
| + res = debugMemSize;
|
| + xmlMutexUnlock(xmlMemMutex);
|
| + return(res);
|
| }
|
|
|
| /**
|
| @@ -567,7 +572,12 @@ xmlMemUsed(void) {
|
|
|
| int
|
| xmlMemBlocks(void) {
|
| - return(debugMemBlocks);
|
| + int res;
|
| +
|
| + xmlMutexLock(xmlMemMutex);
|
| + res = debugMemBlocks;
|
| + xmlMutexUnlock(xmlMemMutex);
|
| + return(res);
|
| }
|
|
|
| #ifdef MEM_LIST
|
|
|