diff options
author | Pavel Kirienko <pavel.kirienko@gmail.com> | 2014-08-24 03:02:52 +0400 |
---|---|---|
committer | Pavel Kirienko <pavel.kirienko@gmail.com> | 2014-08-24 03:02:52 +0400 |
commit | 3866b5a5fe1c6bc9d8b56ef2d603b8c88f1a295d (patch) | |
tree | e8271b64f3617aec6c263b654b5a9c241faac729 /src/modules/uavcan/sensors | |
parent | 1fa49aaea98c18a00ec5bc6e227b46ac19fe66a1 (diff) | |
download | px4-firmware-3866b5a5fe1c6bc9d8b56ef2d603b8c88f1a295d.tar.gz px4-firmware-3866b5a5fe1c6bc9d8b56ef2d603b8c88f1a295d.tar.bz2 px4-firmware-3866b5a5fe1c6bc9d8b56ef2d603b8c88f1a295d.zip |
Resource leak fix
Diffstat (limited to 'src/modules/uavcan/sensors')
-rw-r--r-- | src/modules/uavcan/sensors/sensor_bridge.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/uavcan/sensors/sensor_bridge.cpp b/src/modules/uavcan/sensors/sensor_bridge.cpp index a69514d77..a98596f9c 100644 --- a/src/modules/uavcan/sensors/sensor_bridge.cpp +++ b/src/modules/uavcan/sensors/sensor_bridge.cpp @@ -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; } |