]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix an assert on startup when the disk is full and you're logging to a file
authorRoger Dingledine <arma@torproject.org>
Wed, 22 Dec 2004 08:16:42 +0000 (08:16 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 22 Dec 2004 08:16:42 +0000 (08:16 +0000)
svn:r3204

src/common/log.c

index 3a4f32e17607a5ede2b653e8fcc0f494b17ed7a9..2b0c2cc65afa4e5e9dcca93fe80abf65a087e1e0 100644 (file)
@@ -393,9 +393,7 @@ int add_file_log(int loglevelMin, int loglevelMax, const char *filename)
   add_stream_log(loglevelMin, loglevelMax, filename, f);
   logfiles->needs_close = 1;
   if (log_tor_version(logfiles, 0) < 0) {
-    logfile_t *victim = logfiles;
-    logfiles = victim->next;
-    delete_log(victim);
+    delete_log(logfiles);
   }
   return 0;
 }