+4035. [bug] Close temporary and NZF FILE pointers before moving
+ the former into the latter's place, as required on
+ Windows. [RT #38332]
+
4033. [bug] Missing out of memory check in request.c:req_send.
[RT #38311]
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(tmpname, view->new_zone_file));
} else {
isc_task_endexclusive(server->task);
if (ifp != NULL)
isc_stdio_close(ifp);
- if (ofp != NULL) {
+ if (ofp != NULL)
isc_stdio_close(ofp);
+ if (tmpname != NULL) {
isc_file_remove(tmpname);
- }
- if (tmpname != NULL)
isc_mem_free(server->mctx, tmpname);
+ }
if (raw != NULL)
dns_zone_detach(&raw);
if (zone != NULL)