|
@@ -48,6 +48,7 @@ static void release_callback_event(void * e) {
|
|
|
cl_event event = (cl_event)e;
|
|
|
|
|
|
cl_command_queue cq = event->cq;
|
|
|
+ cl_command cmd = event->command;
|
|
|
|
|
|
/* Remove from command queue */
|
|
|
if (cq != NULL) {
|
|
@@ -59,7 +60,7 @@ static void release_callback_event(void * e) {
|
|
|
cq->barrier = NULL;
|
|
|
|
|
|
/* Remove from the list of out-of-order commands */
|
|
|
- cq->commands = command_list_remove(cq->commands, event->command);
|
|
|
+ cq->commands = command_list_remove(cq->commands, cmd);
|
|
|
|
|
|
/* Unlock command queue */
|
|
|
pthread_mutex_unlock(&cq->mutex);
|
|
@@ -67,6 +68,10 @@ static void release_callback_event(void * e) {
|
|
|
gc_entity_unstore(&cq);
|
|
|
}
|
|
|
|
|
|
+ free(cmd->events);
|
|
|
+ cmd->events = NULL;
|
|
|
+ cmd->num_events = 0;
|
|
|
+
|
|
|
/* Destruct object */
|
|
|
//FIXME: we cannot release tag because it makes StarPU crash
|
|
|
//starpu_tag_remove(event->id);
|