[libxml2] 594514 memory leaks - duplicate initialization
- From: Daniel Veillard <veillard src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libxml2] 594514 memory leaks - duplicate initialization
- Date: Wed, 9 Sep 2009 17:04:14 +0000 (UTC)
commit 44d1eff028ad103a3f33699d0d62b0468664c103
Author: MOD <mrmodbox gmail com>
Date: Wed Sep 9 19:03:13 2009 +0200
594514 memory leaks - duplicate initialization
* globals.c: xmlInitGlobals() might be called multiple times, leaking
the xmlThrDefMutex value
globals.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/globals.c b/globals.c
index 9b4a551..1f807d8 100644
--- a/globals.c
+++ b/globals.c
@@ -46,7 +46,8 @@ static xmlMutexPtr xmlThrDefMutex = NULL;
*/
void xmlInitGlobals(void)
{
- xmlThrDefMutex = xmlNewMutex();
+ if (xmlThrDefMutex != NULL)
+ xmlThrDefMutex = xmlNewMutex();
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]