]> wimlib.net Git - wimlib/blobdiff - src/xml.c
Win32: Use O_BINARY to stop Windows from messing with our data
[wimlib] / src / xml.c
index 6f044d60a300962bc5447768ba274534120170cf..23a088e74de2320963091d7e5718cab4ce7c7b2b 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1428,11 +1428,6 @@ write_xml_data(const struct wim_info *wim_info, int image, int out_fd,
 
        DEBUG("Ended XML document");
 
 
        DEBUG("Ended XML document");
 
-       /* Call xmlFreeTextWriter() before ftello() because the former will
-        * flush the file stream. */
-       xmlFreeTextWriter(writer);
-       writer = NULL;
-
        end_offset = filedes_offset(out_fd);
        if (end_offset == -1) {
                ret = WIMLIB_ERR_WRITE;
        end_offset = filedes_offset(out_fd);
        if (end_offset == -1) {
                ret = WIMLIB_ERR_WRITE;