forked from Archive/PX4-Autopilot
DataValidatorGroup: fix memory leak, delete all DataValidator's in destructor
This commit is contained in:
parent
b870f92e1c
commit
ded3b1a690
|
@ -60,6 +60,12 @@ DataValidatorGroup::DataValidatorGroup(unsigned siblings) :
|
|||
|
||||
DataValidatorGroup::~DataValidatorGroup()
|
||||
{
|
||||
while (_first) {
|
||||
DataValidator* next = _first->sibling();
|
||||
delete (_first);
|
||||
_first = next;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue