- Fix a race condition where the prach struct was being free while the prach worker was still running.

This could cause heap corruption making the enb_phy_test to fail sometimes.
master
faluco 4 years ago committed by faluco
parent 5867668c0c
commit 0a01bd4e1b

@ -72,12 +72,12 @@ int prach_worker::init(const srslte_cell_t& cell_,
void prach_worker::stop() void prach_worker::stop()
{ {
srslte_prach_free(&prach);
running = false; running = false;
sf_buffer* s = nullptr; sf_buffer* s = nullptr;
pending_buffers.push(s); pending_buffers.push(s);
wait_thread_finish(); wait_thread_finish();
srslte_prach_free(&prach);
} }
void prach_worker::set_max_prach_offset_us(float delay_us) void prach_worker::set_max_prach_offset_us(float delay_us)

Loading…
Cancel
Save