From c69572cb9f2467259a73de64c08e141f21f17fa8 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Sun, 26 Aug 2007 10:38:52 +0200 Subject: Load /tmp/libxml2-2.6.30 into libxml2/branches/upstream/current. --- xmlsave.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xmlsave.c') 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)); -- cgit v1.2.3