dtinfo: Fix coverity warning related to using delete not delete []

This commit is contained in:
Peter Howkins
2018-04-23 02:20:23 +01:00
parent 22071fd62a
commit 2f634848ce
38 changed files with 75 additions and 75 deletions

View File

@@ -48,7 +48,7 @@ ComplexTask::~ComplexTask()
delete subtasks[i];
}
if ( subtasks ) delete subtasks;
if ( subtasks ) delete [] subtasks;
}
void ComplexTask::removeAllSubTasks()
@@ -57,7 +57,7 @@ void ComplexTask::removeAllSubTasks()
delete subtasks[i];
}
if ( subtasks ) { delete subtasks; subtasks = 0; }
if ( subtasks ) { delete [] subtasks; subtasks = NULL; }
used = alloc = 0;
}
@@ -98,7 +98,7 @@ ComplexTask::grow(int needed)
if(used){
memcpy(born, subtasks, sizeof(Task*) * used);
delete subtasks; subtasks = 0;
delete [] subtasks; subtasks = NULL;
}
subtasks = born;