diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/log.c | 14 | ||||
-rw-r--r-- | src/common/util.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/common/log.c b/src/common/log.c index faa8f6489..3a60d0576 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -116,14 +116,14 @@ void _log_fn(int severity, const char *fn, const char *format, ...) void close_logs() { - logfile_t *next, *lf; - for (lf = logfiles; lf; lf = lf->next) { - if (lf->needs_close) - fclose(lf->file); - next = lf->next; - free(lf); + logfile_t *victim; + while(logfiles) { + victim = logfiles; + logfiles = logfiles->next; + if (victim->needs_close) + fclose(victim->file); + free(victim); } - logfiles = NULL; } void reset_logs() diff --git a/src/common/util.c b/src/common/util.c index 5f7a6017d..333cd65e6 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -21,7 +21,7 @@ void *tor_malloc(size_t size) { log_fn(LOG_ERR, "Out of memory. Dying."); exit(1); } - memset(result,'X',size); /* XXX deadbeef to encourage bugs */ +// memset(result,'X',size); /* deadbeef to encourage bugs */ return result; } |