]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Actually free the worker_state_t object when we do an update with it
authorNick Mathewson <nickm@torproject.org>
Mon, 31 Oct 2016 18:36:15 +0000 (14:36 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 31 Oct 2016 19:20:25 +0000 (15:20 -0400)
Previously we freed the old "keys" object, but leaked the
worker_state_t that we had taken it from.

Fixes bug 20401; bugfix on 0.2.6.3-alpha.

changes/bug20401 [new file with mode: 0644]
src/or/cpuworker.c

diff --git a/changes/bug20401 b/changes/bug20401
new file mode 100644 (file)
index 0000000..85ab3c7
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (relay):
+    - Avoid a small memory leak when informing worker threads about rotated
+      onion keys. Fixes bug 20401; bugfix on 0.2.6.3-alpha.
+
index 26bc54b55c6e71093221e458f4f4e179b577c05e..fd6de6ea7ce2e782b45058f06c63ab8babe6ff8e 100644 (file)
@@ -168,6 +168,7 @@ update_state_threadfn(void *state_, void *work_)
   server_onion_keys_free(state->onion_keys);
   state->onion_keys = update->onion_keys;
   update->onion_keys = NULL;
+  worker_state_free(update);
   ++state->generation;
   return WQ_RPL_REPLY;
 }