Loading src/core/or/circuit_st.h +5 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ #include "core/or/or.h" #include "lib/container/handles.h" #include "core/or/cell_queue_st.h" struct hs_token_t; Loading Loading @@ -59,6 +61,9 @@ struct circuit_t { uint32_t magic; /**< For memory and type debugging: must equal * ORIGIN_CIRCUIT_MAGIC or OR_CIRCUIT_MAGIC. */ /** Handle entry for handle-based lookup */ HANDLE_ENTRY(circuit, circuit_t); /** The channel that is next in this circuit. */ channel_t *n_chan; Loading src/core/or/circuitlist.c +6 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,9 @@ static int any_opened_circs_cached_val = 0; /********* END VARIABLES ************/ /* Implement circuit handle helpers. */ HANDLE_IMPL(circuit, circuit_t,) or_circuit_t * TO_OR_CIRCUIT(circuit_t *x) { Loading Loading @@ -1247,6 +1250,9 @@ circuit_free_(circuit_t *circ) /* Free any circuit padding structures */ circpad_circuit_free_all_machineinfos(circ); /* Clear all dangling handle references. */ circuit_handles_clear(circ); if (should_free) { memwipe(mem, 0xAA, memlen); /* poison memory */ tor_free(mem); Loading src/core/or/circuitlist.h +6 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #ifndef TOR_CIRCUITLIST_H #define TOR_CIRCUITLIST_H #include "lib/container/handles.h" #include "lib/testsupport/testsupport.h" #include "feature/hs/hs_ident.h" #include "core/or/ocirc_event.h" Loading Loading @@ -242,6 +243,11 @@ MOCK_DECL(void, channel_note_destroy_not_pending, smartlist_t *circuit_find_circuits_to_upgrade_from_guard_wait(void); /* Declare the handle helpers */ HANDLE_DECL(circuit, circuit_t, ) #define circuit_handle_free(h) \ FREE_AND_NULL(circuit_handle_t, circuit_handle_free_, (h)) #ifdef CIRCUITLIST_PRIVATE STATIC void circuit_free_(circuit_t *circ); #define circuit_free(circ) FREE_AND_NULL(circuit_t, circuit_free_, (circ)) Loading Loading
src/core/or/circuit_st.h +5 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ #include "core/or/or.h" #include "lib/container/handles.h" #include "core/or/cell_queue_st.h" struct hs_token_t; Loading Loading @@ -59,6 +61,9 @@ struct circuit_t { uint32_t magic; /**< For memory and type debugging: must equal * ORIGIN_CIRCUIT_MAGIC or OR_CIRCUIT_MAGIC. */ /** Handle entry for handle-based lookup */ HANDLE_ENTRY(circuit, circuit_t); /** The channel that is next in this circuit. */ channel_t *n_chan; Loading
src/core/or/circuitlist.c +6 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,9 @@ static int any_opened_circs_cached_val = 0; /********* END VARIABLES ************/ /* Implement circuit handle helpers. */ HANDLE_IMPL(circuit, circuit_t,) or_circuit_t * TO_OR_CIRCUIT(circuit_t *x) { Loading Loading @@ -1247,6 +1250,9 @@ circuit_free_(circuit_t *circ) /* Free any circuit padding structures */ circpad_circuit_free_all_machineinfos(circ); /* Clear all dangling handle references. */ circuit_handles_clear(circ); if (should_free) { memwipe(mem, 0xAA, memlen); /* poison memory */ tor_free(mem); Loading
src/core/or/circuitlist.h +6 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #ifndef TOR_CIRCUITLIST_H #define TOR_CIRCUITLIST_H #include "lib/container/handles.h" #include "lib/testsupport/testsupport.h" #include "feature/hs/hs_ident.h" #include "core/or/ocirc_event.h" Loading Loading @@ -242,6 +243,11 @@ MOCK_DECL(void, channel_note_destroy_not_pending, smartlist_t *circuit_find_circuits_to_upgrade_from_guard_wait(void); /* Declare the handle helpers */ HANDLE_DECL(circuit, circuit_t, ) #define circuit_handle_free(h) \ FREE_AND_NULL(circuit_handle_t, circuit_handle_free_, (h)) #ifdef CIRCUITLIST_PRIVATE STATIC void circuit_free_(circuit_t *circ); #define circuit_free(circ) FREE_AND_NULL(circuit_t, circuit_free_, (circ)) Loading