소스 검색

another coverity-found memory leak

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

+ 5 - 3
src/or/circuitbuild.c

@@ -2376,9 +2376,11 @@ entry_guards_prepend_from_config(void)
     return;
   }
 
-  if (options->EntryNodes)
-    log_info(LD_CIRC,"Adding configured EntryNodes '%s'.",
-             routerset_to_string(options->EntryNodes));
+  if (options->EntryNodes) {
+    char *string = routerset_to_string(options->EntryNodes);
+    log_info(LD_CIRC,"Adding configured EntryNodes '%s'.", string);
+    tor_free(string);
+  }
 
   entry_routers = smartlist_create();
   entry_fps = smartlist_create();