aboutsummaryrefslogtreecommitdiff
path: root/builtin-rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-rm.c')
-rw-r--r--builtin-rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-rm.c b/builtin-rm.c
index 4d56a1f07..875d8252f 100644
--- a/builtin-rm.c
+++ b/builtin-rm.c
@@ -147,7 +147,7 @@ int cmd_rm(int argc, const char **argv, char **envp)
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");
}