From 5e60f5a2361a0ff73b710c0a28869ef0ec9b5092 Mon Sep 17 00:00:00 2001 From: Manish Vachharajani Date: Sat, 29 May 1999 03:04:30 +0000 Subject: [PATCH] Prevent gnome-xml from writing two copies of the xml tree to the dest file in xmlSaveFile, and free the allocated buffer there --- ChangeLog | 5 +++++ tree.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 43ea9798..90fadfe0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 28 22:58:42 EDT 1999 Manish Vachharajani + + * tree.c: (xmlSaveFile) - removed double call of xmlContentDump. + Also freed allocated buffer. + Wed Apr 21 22:07:35 CEST 1999 * parser.[ch] tree.[ch] entities.[ch] valid.[ch] : removed the main diff --git a/tree.c b/tree.c index a89e56d6..a3b378a0 100644 --- a/tree.c +++ b/tree.c @@ -2778,8 +2778,6 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) { } #endif - xmlDocContentDump(buf, cur); - #ifdef HAVE_ZLIB_H if (zoutput != NULL) { ret = gzwrite(zoutput, buf->content, sizeof(CHAR) * buf->use); @@ -2791,6 +2789,7 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) { #ifdef HAVE_ZLIB_H } #endif + xmlBufferFree(buf); return(ret * sizeof(CHAR)); }