Fixes bug 24762; bugfix on master.
(Not in any released version of Tor.)
--- /dev/null
+ o Minor bugfixes (shutdown, file handling):
+ - Stop trying to remove NULL filenames on shutdown.
+ Fixes bug 24762; bugfix on master.
/**
* Remove the specified file, and log a warning if the operation fails for
- * any reason other than the file not existing.
+ * any reason other than the file not existing. Ignores NULL filenames.
*/
void
tor_remove_file(const char *filename)
{
- if (tor_unlink(filename) != 0 && errno != ENOENT) {
+ if (filename && tor_unlink(filename) != 0 && errno != ENOENT) {
log_warn(LD_FS, "Couldn't unlink %s: %s",
filename, strerror(errno));
}