]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a memory leak in rend_services_introduce
authorNick Mathewson <nickm@torproject.org>
Fri, 28 Nov 2014 04:24:03 +0000 (23:24 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 28 Nov 2014 04:24:03 +0000 (23:24 -0500)
This is CID 1256187 ; bug not in any released tor.

src/or/rendservice.c

index ead9f3fe6657ef7ac3319543ebf0f17a361ede55..26e5659123d33d5964df0741d6f72a32e8c0443d 100644 (file)
@@ -3073,11 +3073,12 @@ rend_services_introduce(void)
   const or_options_t *options = get_options();
   /* List of nodes we need to _exclude_ when choosing a new node to establish
    * an intro point to. */
-  smartlist_t *exclude_nodes = smartlist_new();
+  smartlist_t *exclude_nodes;
 
   if (!have_completed_a_circuit())
     return;
 
+  exclude_nodes = smartlist_new();
   now = time(NULL);
 
   for (i=0; i < smartlist_len(rend_service_list); ++i) {