From 68e844c46bd35bd4527e717c08fb04a045e4e22f Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 29 Oct 2026 16:41:49 +0100 Subject: [PATCH] fix(ekf2): free the system flag buffer in the destructor (#29483) _system_flag_buffer is allocated on first use like the sensor buffers, but it was the only one the destructor did not delete, so every `ekf2 stop` leaked it. Reported by @lihnucs. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julian Oes (cherry picked from commit cb61f8c4f1f57573746f8a75999e24225ee6c0fc) --- src/modules/ekf2/EKF/estimator_interface.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/ekf2/EKF/estimator_interface.cpp b/src/modules/ekf2/EKF/estimator_interface.cpp index 2a9404e0352..1d86c6c1a50 100644 --- a/src/modules/ekf2/EKF/estimator_interface.cpp +++ b/src/modules/ekf2/EKF/estimator_interface.cpp @@ -76,6 +76,8 @@ EstimatorInterface::~EstimatorInterface() #if defined(CONFIG_EKF2_RANGING_BEACON) delete _ranging_beacon_buffer; #endif // CONFIG_EKF2_RANGING_BEACON + + delete _system_flag_buffer; } // Accumulate imu data and store to buffer at desired rate