more coverity fixes

This commit is contained in:
Robin Müller 2021-04-08 18:57:24 +02:00
parent f988271be4
commit 00d9a4f3ed
4 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,6 @@ FixedTimeslotTask::~FixedTimeslotTask(void) {
if(mainThread.joinable()) { if(mainThread.joinable()) {
mainThread.join(); mainThread.join();
} }
delete this;
} }
void FixedTimeslotTask::taskEntryPoint(void* argument) { void FixedTimeslotTask::taskEntryPoint(void* argument) {

View File

@ -38,7 +38,6 @@ PeriodicTask::~PeriodicTask(void) {
if(mainThread.joinable()) { if(mainThread.joinable()) {
mainThread.join(); mainThread.join();
} }
delete this;
} }
void PeriodicTask::taskEntryPoint(void* argument) { void PeriodicTask::taskEntryPoint(void* argument) {

View File

@ -10,6 +10,10 @@ QueueMapManager::QueueMapManager() {
mapLock = MutexFactory::instance()->createMutex(); mapLock = MutexFactory::instance()->createMutex();
} }
QueueMapManager::~QueueMapManager() {
MutexFactory::instance()->deleteMutex(mapLock);
}
QueueMapManager* QueueMapManager::instance() { QueueMapManager* QueueMapManager::instance() {
if (mqManagerInstance == nullptr){ if (mqManagerInstance == nullptr){
mqManagerInstance = new QueueMapManager(); mqManagerInstance = new QueueMapManager();

View File

@ -36,6 +36,8 @@ public:
private: private:
//! External instantiation is forbidden. //! External instantiation is forbidden.
QueueMapManager(); QueueMapManager();
~QueueMapManager();
uint32_t queueCounter = 0; uint32_t queueCounter = 0;
MutexIF* mapLock; MutexIF* mapLock;
QueueMap queueMap; QueueMap queueMap;