mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-21 13:57:35 +08:00
Fix to cancel pending callbacks for closing ORB topics
This commit is contained in:
@@ -249,9 +249,10 @@ ORBDevNode::close(struct file *filp)
|
||||
} else {
|
||||
SubscriberData *sd = filp_to_sd(filp);
|
||||
|
||||
if (sd != nullptr)
|
||||
if (sd != nullptr) {
|
||||
hrt_cancel(&sd->update_call);
|
||||
delete sd;
|
||||
}
|
||||
}
|
||||
|
||||
return CDev::close(filp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user