]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix a memory leak
authorRoger Dingledine <arma@torproject.org>
Sun, 24 Oct 2004 23:09:48 +0000 (23:09 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 24 Oct 2004 23:09:48 +0000 (23:09 +0000)
svn:r2587

src/or/rendservice.c

index f44e1d34e7e9f001d8b5498cdb7fe78efdafa708..ddf54d836c3b890274fde978919fc7a5ea2b98d0 100644 (file)
@@ -42,7 +42,7 @@ typedef struct rend_service_t {
   crypto_pk_env_t *private_key;
   char service_id[REND_SERVICE_ID_LEN+1];
   char pk_digest[DIGEST_LEN];
-  smartlist_t *intro_nodes; /**< list of nicknames for intro points we have,
+  smartlist_t *intro_nodes; /**< list of hexdigests for intro points we have,
                              * or are trying to establish. */
   time_t intro_period_started;
   int n_intro_circuits_launched; /**< count of intro circuits we have
@@ -452,7 +452,7 @@ rend_service_introduce(circuit_t *circuit, const char *request, size_t request_l
     log_fn(LOG_WARN,
            "Can't launch circuit to rendezvous point '%s' for service %s",
            rp_nickname, serviceid);
-    return -1;
+    goto err;
   }
   tor_assert(launched->build_state);
   /* Fill in the circuit's state. */
@@ -846,6 +846,7 @@ void rend_services_introduce(void) {
       changed = 1;
       smartlist_add(intro_routers, router);
       smartlist_add(exclude_routers, router);
+/*XXX009 should strdup the hexdigest, not nickname */
       smartlist_add(service->intro_nodes, tor_strdup(router->nickname));
       log_fn(LOG_INFO,"Picked router %s as an intro point for %s.", router->nickname,
              service->service_id);