missing error check in write_tree(); found by jj@ with scan-build
diff --git a/lib/worktree.c b/lib/worktree.c
index 9fc13a8..aa70f13 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -3879,6 +3879,8 @@ write_tree(struct got_object_id **new_tree_id,
err = match_deleted_or_modified_ct(&ct, te,
path_base_tree, commitable_paths);
+ if (err)
+ goto done;
if (ct) {
/* NB: Deleted entries get dropped here. */
if (ct->status == GOT_STATUS_MODIFY ||