diff options
| author | Mike Hommey <glandium@debian.org> | 2007-08-26 10:38:52 +0200 |
|---|---|---|
| committer | Mike Hommey <glandium@debian.org> | 2007-08-26 10:38:52 +0200 |
| commit | c69572cb9f2467259a73de64c08e141f21f17fa8 (patch) | |
| tree | b0ac225bcbeea038aaa7db22f0ebb7786d07a391 /xmlsave.c | |
| parent | 58f9d16e3a77d5207d9ccc413b61e2cb45190018 (diff) | |
| download | libxml2-upstream/2.6.30.dfsg.tar.gz | |
Load /tmp/libxml2-2.6.30 intoupstream/2.6.30.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'xmlsave.c')
| -rw-r--r-- | xmlsave.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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)); |
