From cbbb218f8bd219d79907623a9304496ee69d8abd Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Fri, 10 Aug 2007 15:06:22 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- refs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs.c b/refs.c index fac654800..09a2c87fc 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); } -- 2.26.2