mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Stop trying to remove NULL filenames on shutdown
Fixes bug 24762; bugfix on master. (Not in any released version of Tor.)
This commit is contained in:
parent
f5d89fab25
commit
d99ccf090f
3
changes/bug24762
Normal file
3
changes/bug24762
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes (shutdown, file handling):
|
||||
- Stop trying to remove NULL filenames on shutdown.
|
||||
Fixes bug 24762; bugfix on master.
|
@ -3480,12 +3480,12 @@ tor_free_all(int postfork)
|
||||
|
||||
/**
|
||||
* 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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user