mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
fixes some problem when freeing unititialized mutexes Daniel
* globals.c threads.c: fixes some problem when freeing unititialized mutexes Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Tue Jul 8 16:02:19 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* globals.c threads.c: fixes some problem when freeing unititialized
|
||||||
|
mutexes
|
||||||
|
|
||||||
Tue Jul 8 14:15:07 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
Tue Jul 8 14:15:07 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* nanoftp.c nanohttp.c: the modules should not import <config.h>
|
* nanoftp.c nanohttp.c: the modules should not import <config.h>
|
||||||
|
@ -46,6 +46,7 @@ void xmlInitGlobals()
|
|||||||
|
|
||||||
void xmlCleanupGlobals()
|
void xmlCleanupGlobals()
|
||||||
{
|
{
|
||||||
|
if (xmlThrDefMutex != NULL)
|
||||||
xmlFreeMutex(xmlThrDefMutex);
|
xmlFreeMutex(xmlThrDefMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,6 +134,8 @@ xmlNewMutex(void)
|
|||||||
void
|
void
|
||||||
xmlFreeMutex(xmlMutexPtr tok)
|
xmlFreeMutex(xmlMutexPtr tok)
|
||||||
{
|
{
|
||||||
|
if (tok == NULL) return;
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_H
|
#ifdef HAVE_PTHREAD_H
|
||||||
pthread_mutex_destroy(&tok->lock);
|
pthread_mutex_destroy(&tok->lock);
|
||||||
#elif defined HAVE_WIN32_THREADS
|
#elif defined HAVE_WIN32_THREADS
|
||||||
|
Reference in New Issue
Block a user