mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +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
|
void
|
||||||
close_logs(void)
|
close_logs(void)
|
||||||
{
|
{
|
||||||
logfile_t *victim;
|
logfile_t *victim, *next;
|
||||||
while (logfiles) {
|
next = logfiles;
|
||||||
victim = logfiles;
|
logfiles = NULL;
|
||||||
logfiles = logfiles->next;
|
while (next) {
|
||||||
|
victim = next;
|
||||||
|
next = next->next;
|
||||||
close_log(victim);
|
close_log(victim);
|
||||||
tor_free(victim->filename);
|
tor_free(victim->filename);
|
||||||
tor_free(victim);
|
tor_free(victim);
|
||||||
|
Loading…
Reference in New Issue
Block a user