clang-tidy: enable readability-delete-null-pointer and fix

This commit is contained in:
Daniel Agar
2019-10-27 19:49:30 -04:00
parent 4192414576
commit 744f06cc8f
7 changed files with 8 additions and 27 deletions
+1 -3
View File
@@ -66,9 +66,7 @@ uORB::DeviceNode::DeviceNode(const struct orb_metadata *meta, const uint8_t inst
uORB::DeviceNode::~DeviceNode()
{
if (_data != nullptr) {
delete[] _data;
}
delete[] _data;
CDev::unregister_driver_and_memory();
}