@@ -558,6 +558,7 @@ ram_to_ram(void)
if (err != 0)
{
err = TASK_SUBMISSION_FAILURE;
+ starpu_task_destroy(task);
goto out;
}