plug a tree object leak in worktree.c
diff --git a/lib/worktree.c b/lib/worktree.c
index 3274af2..d93818f 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -654,6 +654,8 @@ got_worktree_checkout_files(struct got_worktree *worktree,
new_fileindex_path = NULL;
done:
+ if (tree)
+ got_object_tree_close(tree);
if (commit)
got_object_commit_close(commit);
if (obj)