possible double delete
This commit is contained in:
parent
747243684d
commit
e48b6f1432
@ -9,8 +9,8 @@
|
||||
|
||||
class HealthTable : public HealthTableIF, public SystemObject {
|
||||
public:
|
||||
HealthTable(object_id_t objectid);
|
||||
virtual ~HealthTable();
|
||||
explicit HealthTable(object_id_t objectid);
|
||||
~HealthTable() override;
|
||||
|
||||
void setMutexTimeout(MutexIF::TimeoutType timeoutType, uint32_t timeoutMs);
|
||||
|
||||
|
@ -21,7 +21,7 @@ void ObjectManager::setObjectFactoryFunction(produce_function_t objFactoryFunc,
|
||||
this->factoryArgs = factoryArgs;
|
||||
}
|
||||
|
||||
ObjectManager::ObjectManager() {}
|
||||
ObjectManager::ObjectManager() = default;
|
||||
|
||||
ObjectManager::~ObjectManager() {
|
||||
for (auto const& iter : objectList) {
|
||||
@ -36,7 +36,7 @@ ReturnValue_t ObjectManager::insert(object_id_t id, SystemObjectIF* object) {
|
||||
// sif::debug << "ObjectManager::insert: Object " << std::hex
|
||||
// << (int)id << std::dec << " inserted." << std::endl;
|
||||
#endif
|
||||
return this->RETURN_OK;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
} else {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "ObjectManager::insert: Object ID " << std::hex << static_cast<uint32_t>(id)
|
||||
@ -53,7 +53,7 @@ ReturnValue_t ObjectManager::insert(object_id_t id, SystemObjectIF* object) {
|
||||
}
|
||||
|
||||
ReturnValue_t ObjectManager::remove(object_id_t id) {
|
||||
if (this->getSystemObject(id) != NULL) {
|
||||
if (this->getSystemObject(id) != nullptr) {
|
||||
this->objectList.erase(id);
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
// sif::debug << "ObjectManager::removeObject: Object " << std::hex
|
||||
|
@ -31,7 +31,5 @@ int customSetup() {
|
||||
}
|
||||
|
||||
int customTeardown() {
|
||||
ObjectManager* objMan = ObjectManager::instance();
|
||||
delete objMan;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user