Fixing cppcheck issues

This commit is contained in:
Melissa Elkadi
2021-03-01 15:13:50 -08:00
parent 8988d8ef8c
commit 15905c746d
8 changed files with 10 additions and 4 deletions
@@ -339,6 +339,7 @@ extern "C" {
int itti_create_queue(const task_info_t *taskInfo) {
pthread_mutex_lock (&lock_nb_queues);
int newQueue=nb_queues++;
// cppcheck-suppress memleakOnRealloc
AssertFatal(tasks=(task_list_t **) realloc(tasks, nb_queues * sizeof(*tasks)),"");
tasks[newQueue]= new task_list_t;
pthread_mutex_unlock (&lock_nb_queues);