commit - a06ff56fe6d05906b4a5c515605b1196b3479d1f
commit + a6b21eef0424b9af0a7d5dc6ade675b94dde3150
blob - f846908bacd4e75c56ebc30d1e1761925c69fa62
blob + 9eb2d798442973db6cdaca5e079d37834bf0ca46
--- lib/worktree.c
+++ lib/worktree.c
free(worktree->path_prefix);
free(worktree->base_commit_id);
free(worktree->head_ref_name);
- if (worktree->lockfd != -1)
+ if (worktree->lockfd != -1) {
if (close(worktree->lockfd) != 0)
err = got_error_from_errno2("close",
got_worktree_get_root_path(worktree));
+ }
free(worktree->root_path);
free(worktree->gotconfig_path);
got_gotconfig_free(worktree->gotconfig);