summaryrefslogtreecommitdiff
path: root/threads.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-10-28 09:07:41 +0000
committerMike Hommey <mh@glandium.org>2004-10-28 09:07:41 +0000
commit9705f1a5e858108d21a0128556f42b25d16833cd (patch)
treef819e7482d433f8bf5da005695c79189dd5ce527 /threads.c
parent0732be88d054db33fa0ca479eab9988c8e6be42e (diff)
downloadlibxml2-9705f1a5e858108d21a0128556f42b25d16833cd.tar.gz
Load /tmp/tmp.SgII7T/libxml2-2.6.15 intoupstream/2.6.15
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'threads.c')
-rw-r--r--threads.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/threads.c b/threads.c
index b4a4cdc..d7bd783 100644
--- a/threads.c
+++ b/threads.c
@@ -359,6 +359,9 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
************************************************************************/
#ifdef LIBXML_THREAD_ENABLED
+#ifdef xmlLastError
+#undef xmlLastError
+#endif
/**
* xmlFreeGlobalState:
* @state: a thread global state
@@ -369,8 +372,10 @@ xmlRMutexUnlock(xmlRMutexPtr tok ATTRIBUTE_UNUSED)
static void
xmlFreeGlobalState(void *state)
{
- /* free any memory allocated in the thread's xmlLastError */
- xmlResetLastError();
+ xmlGlobalState *gs = (xmlGlobalState *) state;
+
+ /* free any memory allocated in the thread's xmlLastError */
+ xmlResetError(&(gs->xmlLastError));
free(state);
}