Преглед изворни кода

make our tor_assert actually work when it's going to be triggered,
rather than seg fault


svn:r2368

Roger Dingledine пре 21 година
родитељ
комит
8385fdb590
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/common/log.c

+ 1 - 1
src/common/log.c

@@ -233,7 +233,7 @@ static void delete_log(logfile_t *victim) {
     logfiles = victim->next;
     logfiles = victim->next;
   else {
   else {
     for(tmpl = logfiles; tmpl && tmpl->next != victim; tmpl=tmpl->next) ;
     for(tmpl = logfiles; tmpl && tmpl->next != victim; tmpl=tmpl->next) ;
-    tor_assert(tmpl->next == victim);
+    tor_assert(tmpl && tmpl->next == victim);
     tmpl->next = victim->next;
     tmpl->next = victim->next;
   }
   }
   tor_free(victim->filename);
   tor_free(victim->filename);