[tor-commits] [tor/maint-0.3.2] Fix memory leak when freeing socket_table in KIST.

nickm at torproject.org nickm at torproject.org
Mon Oct 30 15:07:51 UTC 2017


commit 8652f3e9e82f5f5565eeb2d6e7ee6fa449b26042
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Oct 17 13:40:31 2017 -0400

    Fix memory leak when freeing socket_table in KIST.
---
 changes/bug23774        | 4 ++++
 src/or/scheduler_kist.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/changes/bug23774 b/changes/bug23774
new file mode 100644
index 000000000..2ea5c0122
--- /dev/null
+++ b/changes/bug23774
@@ -0,0 +1,4 @@
+  o Minor bugfixes (memory leak):
+    - Fix a minor memory-leak-at-exit in the KIST scheduler. This
+      bug should have no user-visible impact. Fixes bug 23774;
+      bugfix on 0.3.2.1-alpha.
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
index d269fb49b..03aa9c45b 100644
--- a/src/or/scheduler_kist.c
+++ b/src/or/scheduler_kist.c
@@ -158,6 +158,7 @@ static void
 free_all_socket_info(void)
 {
   HT_FOREACH_FN(socket_table_s, &socket_table, free_socket_info_by_ent, NULL);
+  HT_CLEAR(socket_table_s, &socket_table);
 }
 
 static socket_table_ent_t *





More information about the tor-commits mailing list