gtask: fix leak in example code