summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_circuit.h
diff options
context:
space:
mode:
authorMicah Elizabeth Scott <beth@torproject.org>2023-03-27 16:18:26 -0700
committerMicah Elizabeth Scott <beth@torproject.org>2023-05-10 07:38:29 -0700
commitac466a22195f8d550a8612bb89583c5e58eadb1a (patch)
tree47960d33a6d84f4011bc9b223f33c3310ae3e7d8 /src/feature/hs/hs_circuit.h
parentac29c7209dbdaf0d317f1c4eb67d5e330386552b (diff)
downloadtor-ac466a22195f8d550a8612bb89583c5e58eadb1a.tar.gz
tor-ac466a22195f8d550a8612bb89583c5e58eadb1a.zip
hs_pow: leak fix, free the contents of pqueue entries in hs_pow_free_service_state
Asan catches this pretty readily when ending a service gracefully while a DoS is in progress and the queue is full of items that haven't yet timed out. The module boundaries in hs_circuit are quite fuzzy here, but I'm trying to follow the vibe of the existing hs_pow code. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_circuit.h')
-rw-r--r--src/feature/hs/hs_circuit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h
index da4eb9aa0b..8b0692d76b 100644
--- a/src/feature/hs/hs_circuit.h
+++ b/src/feature/hs/hs_circuit.h
@@ -33,6 +33,7 @@ typedef struct pending_rend_t {
} pending_rend_t;
int top_of_rend_pqueue_is_worthwhile(hs_pow_service_state_t *pow_state);
+void rend_pqueue_clear(hs_pow_service_state_t *pow_state);
/* Cleanup function when the circuit is closed or freed. */
void hs_circ_cleanup_on_close(circuit_t *circ);