vtol_att_control: initialise pointers and free memory

Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
Roman
2016-11-22 10:05:53 +01:00
committed by Julian Oes
parent 7a698952fb
commit 92a5db92a2
2 changed files with 9 additions and 4 deletions
@@ -177,6 +177,11 @@ VtolAttitudeControl::~VtolAttitudeControl()
} while (_control_task != -1);
}
// free memory used by instances of base class VtolType
if (_vtol_type != nullptr) {
delete _vtol_type;
}
VTOL_att_control::g_control = nullptr;
}