Browse Source

disarm a trap that's lying in wait for us

svn:r4741
Roger Dingledine 20 years ago
parent
commit
f4eec180a2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/common/log.c

+ 2 - 1
src/common/log.c

@@ -307,9 +307,10 @@ static void close_log(logfile_t *victim)
     fclose(victim->file);
     fclose(victim->file);
   } else if (victim->is_syslog) {
   } else if (victim->is_syslog) {
 #ifdef HAVE_SYSLOG_H
 #ifdef HAVE_SYSLOG_H
-    if (--syslog_count == 0)
+    if (--syslog_count == 0) {
       /* There are no other syslogs; close the logging facility. */
       /* There are no other syslogs; close the logging facility. */
       closelog();
       closelog();
+    }
 #endif
 #endif
   }
   }
 }
 }