mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
yes, in fact, i broke it. putting back.
svn:r2918
This commit is contained in:
parent
6322287dc1
commit
246b14d8e9
@ -345,16 +345,16 @@ int add_callback_log(int loglevelMin, int loglevelMax, log_callback cb)
|
||||
/** Close any log handlers added by add_temp_log or marked by mark_logs_temp */
|
||||
void close_temp_logs(void)
|
||||
{
|
||||
logfile_t *victim, *lf;
|
||||
for (lf = logfiles; lf; ) {
|
||||
if (lf->is_temporary) {
|
||||
victim = lf;
|
||||
lf = lf->next;
|
||||
close_log(victim);
|
||||
tor_free(victim->filename);
|
||||
tor_free(victim);
|
||||
logfile_t *lf, **p;
|
||||
for (p = &logfiles; *p; ) {
|
||||
if ((*p)->is_temporary) {
|
||||
lf = *p;
|
||||
*p = (*p)->next;
|
||||
close_log(lf);
|
||||
tor_free(lf->filename);
|
||||
tor_free(lf);
|
||||
} else {
|
||||
lf = lf->next;
|
||||
p = &((*p)->next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user