Skip to content

Commit

Permalink
uORB: ORBSet don't allow duplicate insertion
Browse files Browse the repository at this point in the history
* fixes a small memory leak in uORBManager.cpp (if using ORB_COMMUNICATOR)
  • Loading branch information
katzfey authored May 30, 2024
1 parent 42f4e02 commit 493c9e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platforms/common/uORB/ORBSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class ORBSet
{
Node **p;

// Don't allow duplicates to be inserted
if (find(node_name)) {
return;
}

if (_top == nullptr) {
p = &_top;

Expand Down

0 comments on commit 493c9e4

Please sign in to comment.