diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-01-25 14:09:18 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-01-25 14:09:18 -0500 |
commit | ab87b61a9d1e18d85229c9fbf6c3862cea6a7bdd (patch) | |
tree | 2746c8e4d12de047411f381b8a814a721b330230 | |
parent | a93cabd9ab1ea9614136033f6c17eac295ff4adf (diff) | |
download | tor-ab87b61a9d1e18d85229c9fbf6c3862cea6a7bdd.tar.gz tor-ab87b61a9d1e18d85229c9fbf6c3862cea6a7bdd.zip |
Don't unlock a new log until done logging the tor version.
This might please coverity scan.
-rw-r--r-- | src/common/log.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/common/log.c b/src/common/log.c index ef65be8a3d..dfea58f47c 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -678,13 +678,11 @@ add_file_log(const log_severity_list_t *severity, const char *filename) logfiles->needs_close = 1; lf = logfiles; _log_global_min_severity = get_min_log_level(); - UNLOCK_LOGS(); if (log_tor_version(lf, 0) < 0) { - LOCK_LOGS(); delete_log(lf); - UNLOCK_LOGS(); } + UNLOCK_LOGS(); return 0; } |