summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorAlex Riesen <raa.lkml@gmail.com>2007-08-10 15:06:22 +0200
committerJunio C Hamano <gitster@pobox.com>2007-08-10 22:50:06 -0700
commitcbbb218f8bd219d79907623a9304496ee69d8abd (patch)
treea523571799cdb59130a3d97108a29d4c81427ab0 /refs.c
parent21a02980f9025c3a338fb897796542ddef8707d1 (diff)
downloadgit-cbbb218f8bd219d79907623a9304496ee69d8abd.tar.gz
Fix filehandle leak in "git branch -D"
On Windows (it can't touch open files in any way) the following fails: git branch -D branch1 branch2 if the both branches are in packed-refs. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index fac6548001..09a2c87fc2 100644
--- a/refs.c
+++ b/refs.c
@@ -869,6 +869,7 @@ static int repack_without_ref(const char *refname)
die("too long a refname '%s'", list->name);
write_or_die(fd, line, len);
}
+ close(fd);
return commit_lock_file(&packlock);
}