[tor-commits] [tor/master] Fix memleak found by unittests.
nickm at torproject.org
nickm at torproject.org
Tue May 8 18:14:03 UTC 2018
commit e17f436fff541e0c31827f0e99bd345096d276e0
Author: George Kadianakis <desnacked at riseup.net>
Date: Fri Apr 27 15:27:44 2018 +0300
Fix memleak found by unittests.
---
src/or/circuitbuild.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 74e607d18..1eb3947ae 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2633,7 +2633,9 @@ choose_good_middle_server(uint8_t purpose,
/** If a hidden service circuit wants a specific middle node, pin it. */
if (middle_node_must_be_vanguard(options, purpose, cur_len)) {
log_debug(LD_GENERAL, "Picking a sticky node (cur_len = %d)", cur_len);
- return pick_vanguard_middle_node(options, flags, cur_len, excluded);
+ choice = pick_vanguard_middle_node(options, flags, cur_len, excluded);
+ smartlist_free(excluded);
+ return choice;
}
choice = router_choose_random_node(excluded, options->ExcludeNodes, flags);
More information about the tor-commits
mailing list