task: fix a dead store

Found by Clang.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>