1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-01 10:06:59 +03:00

Prevent gnome-xml from writing two copies of the xml tree to the dest file in

xmlSaveFile, and free the allocated buffer there
This commit is contained in:
Manish Vachharajani
1999-05-29 03:04:30 +00:00
parent 5099ae89ef
commit 5e60f5a236
2 changed files with 6 additions and 2 deletions

3
tree.c
View File

@ -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));
}