summaryrefslogtreecommitdiff
path: root/threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/threads.c b/threads.c
index ac6c8d6..b4a4cdc 100644
--- a/threads.c
+++ b/threads.c
@@ -369,6 +369,8 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
static void
xmlFreeGlobalState(void *state)
{
+ /* free any memory allocated in the thread's xmlLastError */
+ xmlResetLastError();
free(state);
}