From 5b82e5a23e4b442bc330783091ed01b95f037175 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 21 Jul 2012 20:16:42 +0100 Subject: DOMDocument: Actually free the empty memoised string --- src/core/document.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/document.c b/src/core/document.c index c43f0bc..456d906 100644 --- a/src/core/document.c +++ b/src/core/document.c @@ -143,7 +143,7 @@ dom_exception _dom_document_initialise(dom_document *doc, /* Intern the empty string. The use of a space in the constant * is to prevent the compiler warning about an empty string. */ - err = dom_string_create_interned((const uint8_t *) ' ', 0, + err = dom_string_create_interned((const uint8_t *) " ", 0, &doc->_memo_empty); if (err != DOM_NO_ERR) { dom_string_unref(doc->class_string); @@ -184,6 +184,7 @@ bool _dom_document_finalise(dom_document *doc) dom_string_unref(doc->id_name); dom_string_unref(doc->class_string); + dom_string_unref(doc->_memo_empty); _dom_document_event_internal_finalise(doc, &doc->dei); -- cgit v1.2.3