|
@@ -217,6 +217,15 @@ static void _starpu_worker_task_list_destroy(struct _starpu_worker_task_list * l
|
|
{
|
|
{
|
|
if(l)
|
|
if(l)
|
|
{
|
|
{
|
|
|
|
+ /* There can be empty task grids, when we picked the last task after the front task grid */
|
|
|
|
+ struct _starpu_task_grid *t = l->first, *nextt;
|
|
|
|
+
|
|
|
|
+ while(t) {
|
|
|
|
+ STARPU_ASSERT(!t->task);
|
|
|
|
+ nextt = t->up;
|
|
|
|
+ _starpu_task_grid_destroy(t);
|
|
|
|
+ t = nextt;
|
|
|
|
+ }
|
|
STARPU_PTHREAD_MUTEX_DESTROY(&l->mutex);
|
|
STARPU_PTHREAD_MUTEX_DESTROY(&l->mutex);
|
|
free(l);
|
|
free(l);
|
|
}
|
|
}
|