Explorar o código

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


svn:r2368

Roger Dingledine %!s(int64=21) %!d(string=hai) anos
pai
achega
8385fdb590
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
   else {
     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;
   }
   tor_free(victim->filename);