summaryrefslogtreecommitdiff
path: root/src/core/document.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-21 20:16:42 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-21 20:16:42 +0100
commit5b82e5a23e4b442bc330783091ed01b95f037175 (patch)
treec3f636b168041b9e6136c89d2f796391ed4685eb /src/core/document.c
parent967380654ba87462dfb2faeeefbb3ea481fe05a2 (diff)
downloadlibdom-5b82e5a23e4b442bc330783091ed01b95f037175.tar.gz
libdom-5b82e5a23e4b442bc330783091ed01b95f037175.tar.bz2
DOMDocument: Actually free the empty memoised string
Diffstat (limited to 'src/core/document.c')
-rw-r--r--src/core/document.c3
1 files changed, 2 insertions, 1 deletions
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);