mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Fix bug in close_logs(): when we close and delete logs, remove them all from the global "logfiles" list. This should fix bug 222.
svn:r6145
This commit is contained in:
parent
0c132ee2a1
commit
daea6b21a5
@ -314,10 +314,12 @@ _log_err(uint32_t domain, const char *format, ...)
|
||||
void
|
||||
close_logs(void)
|
||||
{
|
||||
logfile_t *victim;
|
||||
while (logfiles) {
|
||||
victim = logfiles;
|
||||
logfiles = logfiles->next;
|
||||
logfile_t *victim, *next;
|
||||
next = logfiles;
|
||||
logfiles = NULL;
|
||||
while (next) {
|
||||
victim = next;
|
||||
next = next->next;
|
||||
close_log(victim);
|
||||
tor_free(victim->filename);
|
||||
tor_free(victim);
|
||||
|
Loading…
Reference in New Issue
Block a user