Browse Source

Merge remote-tracking branch 'origin/maint-0.2.2'

Nick Mathewson 12 years ago
parent
commit
ceebc8283f
2 changed files with 13 additions and 2 deletions
  1. 6 0
      changes/bug4424
  2. 7 2
      src/or/rendclient.c

+ 6 - 0
changes/bug4424

@@ -0,0 +1,6 @@
+  o Major bugfixes
+
+    - Don't leak memory when we check whether a hidden service
+      descriptor has any usable introduction points left.  Fixes bug
+      4424.  Bugfix on 0.2.2.25-alpha; found by frosty_un.
+

+ 7 - 2
src/or/rendclient.c

@@ -1079,8 +1079,13 @@ rend_client_get_random_intro_impl(const rend_cache_entry_t *entry,
 int
 rend_client_any_intro_points_usable(const rend_cache_entry_t *entry)
 {
-  return rend_client_get_random_intro_impl(
-          entry, get_options()->StrictNodes, 0) != NULL;
+  extend_info_t *extend_info =
+    rend_client_get_random_intro_impl(entry, get_options()->StrictNodes, 0);
+
+  int rv = (extend_info != NULL);
+
+  extend_info_free(extend_info);
+  return rv;
 }
 
 /** Client-side authorizations for hidden services; map of onion address to