[Tasks] Fix a memory leak

Fixes https://github.com/01org/dleyna-collabora-android/issues/58

Signed-off-by: Regis Merlino <regis.merlino@intel.com>