Fixed memory leak when a task queue push runs out of memory