From de5087ae3ef45b6f54cb206bdf40909f8c626cfd Mon Sep 17 00:00:00 2001 From: Matteo Del Seppia <71389092+matteodelseppia@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:10:28 +0200 Subject: [PATCH] Patch for issue #22818 (#23170) When calling "differential_drive stop" a missing return statement was causing a segmentation fault due to access to already freed memory. --- src/modules/differential_drive/DifferentialDrive.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/differential_drive/DifferentialDrive.cpp b/src/modules/differential_drive/DifferentialDrive.cpp index 70553ffeb369..a1d34e01e7d2 100644 --- a/src/modules/differential_drive/DifferentialDrive.cpp +++ b/src/modules/differential_drive/DifferentialDrive.cpp @@ -66,6 +66,7 @@ void DifferentialDrive::Run() if (should_exit()) { ScheduleClear(); exit_and_cleanup(); + return; } hrt_abstime now = hrt_absolute_time();