commit - 08578a35f60be8657db97b705f27a55ab61850c8
commit + e7abd6b665c4cff5b07ed20382f14cc1b5775c5c
blob - 2d9ccf00b3ed3c679a91587ccfd6c31854daf288
blob + 293cbc6e16de48dd0ff2f37169051429fd6e2493
--- lib/worktree.c
+++ lib/worktree.c
free(worktree->root_path);
free(worktree->gotconfig_path);
got_gotconfig_free(worktree->gotconfig);
- close(worktree->root_fd);
+ if (close(worktree->root_fd) == -1 && err == NULL)
+ err = got_error_from_errno2("close",
+ got_worktree_get_root_path(worktree));
free(worktree);
return err;
}