aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 3ddb37a262..5e8b32d780 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -298,6 +298,7 @@ cpuworker_onion_handshake_replyfn(void *work_)
cpuworker_reply_t rpl;
or_circuit_t *circ = NULL;
+ tor_assert(total_pending_tasks > 0);
--total_pending_tasks;
/* Could avoid this, but doesn't matter. */
@@ -553,6 +554,8 @@ cpuworker_cancel_circ_handshake(or_circuit_t *circ)
/* It successfully cancelled. */
memwipe(job, 0xe0, sizeof(*job));
tor_free(job);
+ tor_assert(total_pending_tasks > 0);
+ --total_pending_tasks;
}
circ->workqueue_entry = NULL;