mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
Resource leak fix
This commit is contained in:
@@ -118,6 +118,7 @@ void UavcanCDevSensorBridgeBase::publish(const int redundancy_channel_id, const
|
||||
channel->orb_advert = orb_advertise(channel->orb_id, report);
|
||||
if (channel->orb_advert < 0) {
|
||||
log("ADVERTISE FAILED");
|
||||
(void)unregister_class_devname(_class_devname, class_instance);
|
||||
*channel = Channel();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user