Merge pull request #1510 from aww-aww/patch-1

Move unlink of temp file to before fatal exit
This commit is contained in:
Yorgos Thessalonikefs
2026-09-21 14:08:55 +02:00
committed by GitHub
+1 -1
View File
@@ -1275,9 +1275,9 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
FlushFileBuffers((HANDLE)_get_osfhandle(_fileno(out)));
#endif
if(fclose(out) != 0) {
unlink(tempf);
fatal_exit("could not complete write: %s: %s",
fname, strerror(errno));
unlink(tempf);
return;
}
/* success; overwrite actual file */