summaryrefslogtreecommitdiff
path: root/xmlsave.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2007-08-26 10:54:57 +0200
committerMike Hommey <glandium@debian.org>2007-08-26 10:54:57 +0200
commit2b6861bb726172b0a9946e7d31ff4ca163bae6df (patch)
tree3e66058a45f841a1155d57ee239f663535eb6bfe /xmlsave.c
parent36cccb83804d8cbd041066d7610c137329e16878 (diff)
parentc69572cb9f2467259a73de64c08e141f21f17fa8 (diff)
downloadlibxml2-debian/2.6.30.dfsg-1.tar.gz
New upstream releasedebian/2.6.30.dfsg-1
Diffstat (limited to 'xmlsave.c')
-rw-r--r--xmlsave.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xmlsave.c b/xmlsave.c
index b97327e..30ebf49 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -2187,12 +2187,13 @@ xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
encoding = (const char *) cur->encoding;
if (encoding != NULL) {
- handler = xmlFindCharEncodingHandler(encoding);
- if (handler == NULL) {
- xmlFree((char *) cur->encoding);
- cur->encoding = NULL;
- }
+ handler = xmlFindCharEncodingHandler(encoding);
+ if (handler == NULL) {
+ xmlFree((char *) cur->encoding);
+ cur->encoding = NULL;
+ encoding = NULL;
}
+ }
buf = xmlOutputBufferCreateFile(f, handler);
if (buf == NULL) return(-1);
memset(&ctxt, 0, sizeof(ctxt));