+4035. [bug] Close temporary and NZF FILE pointers before moving
+ the former into the latter's place, as required on
+ Windows. [RT #38332]
+
4034. [func] When added, negative trust anchors (NTA) are now
saved to files (viewname.nta), in order to
persist across restarts of the named server.
result = isc_stdio_read(buf, 1, 1024, ifp, &n);
}
+ /*
+ * Close files before overwriting the nzfile
+ * with the temporary file as it's necessary on
+ * some platforms (win32).
+ */
+ (void) isc_stdio_close(ifp);
+ ifp = NULL;
+ (void) isc_stdio_close(ofp);
+ ofp = NULL;
+
/* Move temporary into place */
CHECK(isc_file_rename(tmp, nzfile));
} else {
cleanup:
if (ifp != NULL)
- isc_stdio_close(ifp);
+ (void) isc_stdio_close(ifp);
if (ofp != NULL)
- isc_stdio_close(ofp);
+ (void) isc_stdio_close(ofp);
return (result);
}