From 535d4b70f35007b087cafef48243b14ec496e274 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 19 Jun 2020 13:48:13 +0100 Subject: [PATCH] avoid capturing callback parameters by reference to avoid dangling pointers --- srsenb/src/stack/rrc/rrc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index fee772e57..94258c3e2 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -539,7 +539,7 @@ void rrc::process_release_complete(uint16_t rnti) user_it->second->send_connection_release(); } // delay user deletion for ~50 TTI (until RRC release is sent) - timers->defer_callback(50, [&]() { rem_user_thread(rnti); }); + timers->defer_callback(50, [this, rnti]() { rem_user_thread(rnti); }); } else { rrc_log->error("Received ReleaseComplete for unknown rnti=0x%x\n", rnti); }