Skip to content

Commit 434af39

Browse files
alvasMancodebot
authored andcommitted
du: fix segfault by capturing ue pointer by value
The defer was outliving the procedure, causing UB when accessing the member variables of the proc.
1 parent 0b5bb8a commit 434af39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/du/du_high/du_manager/procedures/ue_configuration_procedure.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ void ue_configuration_procedure::handle_rrc_reconfiguration_complete_ind()
454454
{
455455
// Dispatch DRB context destruction to the respective UE executor.
456456
task_executor& exec = du_params.services.ue_execs.mac_ul_pdu_executor(ue->ue_index);
457-
auto flush_fn = TRACE_TASK([this]() mutable {
457+
auto flush_fn = TRACE_TASK([ue = ue]() mutable {
458458
for (auto& [bearer_id, bearer] : ue->bearers.drbs()) {
459459
if (bearer != nullptr && bearer->drb_f1u != nullptr) {
460460
bearer->drb_f1u->get_tx_sdu_handler().flush_ul_buffer();

0 commit comments

Comments
 (0)