소스 검색

we were leaking a smartlist every time we built a circuit

svn:r5795
Roger Dingledine 20 년 전
부모
커밋
5ca40affeb
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/or/circuitbuild.c

+ 3 - 1
src/or/circuitbuild.c

@@ -1495,13 +1495,15 @@ static routerinfo_t *
 choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
 {
   routerinfo_t *r, *choice;
-  smartlist_t *excluded = smartlist_create();
+  smartlist_t *excluded;
   or_options_t *options = get_options();
 
   if (state && options->UseEntryGuards) {
     return choose_random_entry(state);
   }
 
+  excluded = smartlist_create();
+
   if (state && (r = build_state_get_exit_router(state))) {
     smartlist_add(excluded, r);
     routerlist_add_family(excluded, r);