From: Alex Riesen Date: Fri, 10 Aug 2007 13:06:22 +0000 (+0200) Subject: Fix filehandle leak in "git branch -D" X-Git-Tag: v1.5.3-rc5~31 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cbbb218f8bd219d79907623a9304496ee69d8abd;p=git.git 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 --- 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); }