mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +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:
@@ -1,3 +1,8 @@
|
|||||||
|
Fri May 28 22:58:42 EDT 1999 Manish Vachharajani <mvachhar@vger.rutgers.edu>
|
||||||
|
|
||||||
|
* tree.c: (xmlSaveFile) - removed double call of xmlContentDump.
|
||||||
|
Also freed allocated buffer.
|
||||||
|
|
||||||
Wed Apr 21 22:07:35 CEST 1999
|
Wed Apr 21 22:07:35 CEST 1999
|
||||||
|
|
||||||
* parser.[ch] tree.[ch] entities.[ch] valid.[ch] : removed the main
|
* parser.[ch] tree.[ch] entities.[ch] valid.[ch] : removed the main
|
||||||
|
3
tree.c
3
tree.c
@@ -2778,8 +2778,6 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
xmlDocContentDump(buf, cur);
|
|
||||||
|
|
||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
if (zoutput != NULL) {
|
if (zoutput != NULL) {
|
||||||
ret = gzwrite(zoutput, buf->content, sizeof(CHAR) * buf->use);
|
ret = gzwrite(zoutput, buf->content, sizeof(CHAR) * buf->use);
|
||||||
@@ -2791,6 +2789,7 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
|
|||||||
#ifdef HAVE_ZLIB_H
|
#ifdef HAVE_ZLIB_H
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
xmlBufferFree(buf);
|
||||||
return(ret * sizeof(CHAR));
|
return(ret * sizeof(CHAR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user