소스 검색

Merge remote-tracking branch 'public/bug25981'

Nick Mathewson 6 년 전
부모
커밋
75e5b778e1
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/or/main.c

+ 5 - 0
src/or/main.c

@@ -1672,6 +1672,11 @@ static mainloop_event_t *postloop_cleanup_ev=NULL;
 void
 mainloop_schedule_postloop_cleanup(void)
 {
+  if (PREDICT_UNLIKELY(postloop_cleanup_ev == NULL)) {
+    // (It's possible that we can get here if we decide to close a connection
+    // in the earliest stages of our configuration, before we create events.)
+    return;
+  }
   mainloop_event_activate(postloop_cleanup_ev);
 }