aboutsummaryrefslogtreecommitdiff
path: root/builtin-update-index.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-update-index.c')
-rw-r--r--builtin-update-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-update-index.c b/builtin-update-index.c
index ef5024345..1a4200d15 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -648,7 +648,7 @@ int cmd_update_index(int argc, const char **argv, char **envp)
finish:
if (active_cache_changed) {
if (write_cache(newfd, active_cache, active_nr) ||
- commit_lock_file(lock_file))
+ close(newfd) || commit_lock_file(lock_file))
die("Unable to write new index file");
}