Skip to content

test: Possible NULL deref in free_fake_orcirc()

Introduced with legacy/trac#32196 (moved).

Found by coverity:

*** CID 1455207:  Null pointer dereferences  (FORWARD_NULL)
/src/test/test_relay.c: 116 in test_relay_close_circuit()
110       if (orcirc) {
111         circuitmux_detach_circuit(nchan->cmux, TO_CIRCUIT(orcirc));
112         circuitmux_detach_circuit(pchan->cmux, TO_CIRCUIT(orcirc));
113         cell_queue_clear(&orcirc->base_.n_chan_cells);
114         cell_queue_clear(&orcirc->p_chan_cells);
115       }
>>>     CID 1455207:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "orcirc" to "free_fake_orcirc", which dereferences it.
116       free_fake_orcirc(orcirc);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information