summaryrefslogtreecommitdiff
path: root/xmlmemory.c
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2003-12-30 08:30:19 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2003-12-30 08:30:19 +0000
commit72ee48d55f9002544d011826e2897b5054b7e32c (patch)
tree91b1358d7a0ab850f72bc8338cc250021a188763 /xmlmemory.c
parent1f5c9891a08c20709a59ab004b84b934d3c2e5d8 (diff)
downloadlibxml2-72ee48d55f9002544d011826e2897b5054b7e32c.tar.gz
Fixed memory leak reported by Dave Beckett Removed spurious comment
* parser.c, xmlmemory.c, include/libxml/xmlmemory.h: Fixed memory leak reported by Dave Beckett * xmlschemas.c: Removed spurious comment reported on the mailing list * xinclude.c, xpath.c, xpointer.c, libxml/include/xpointer.h: Further work on Bug 129967 concerning xpointer range handling and range-to function; much better, but still not complete
Diffstat (limited to 'xmlmemory.c')
-rw-r--r--xmlmemory.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmlmemory.c b/xmlmemory.c
index 712a967f..d8fa2b9c 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -812,6 +812,20 @@ xmlInitMemory(void)
}
/**
+ * xmlCleanupMemory:
+ *
+ * Free up all the memory associated with memorys
+ */
+void
+xmlCleanupMemory(void) {
+ if (xmlMemInitialized == 0)
+ return;
+
+ xmlFreeMutex(xmlMemMutex);
+ xmlMemInitialized = 0;
+}
+
+/**
* xmlMemSetup:
* @freeFunc: the free() function to use
* @mallocFunc: the malloc() function to use