mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 22:47:34 +08:00
5fe82aa485
* mavlink: fix potential use-after-free If a mavlink instance is force stopped, the main thread might be out of scope and the receiver thread would be doing a use-after-free. Instead the receiver thread needs to check its own _should_exit flag. * mavlink: protect shared data by mutex in dtor I'm not sure if this potentially fixes any of the segfaults we have seen on stopping mavlink instances but it potentially could matter if the mavlink_receiver thread is killed after a timeout and tries to send any messages as a zombie.