From: Brandon Casey Date: Sun, 18 May 2008 04:00:01 +0000 (-0500) Subject: builtin-clone.c: Need to closedir() in copy_or_link_directory() X-Git-Tag: v1.5.6-rc0~5^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=689ef4d42e1adf409b632ed5c36beda4852a4720;p=git.git builtin-clone.c: Need to closedir() in copy_or_link_directory() So not to leak file descriptors, close the directory after opening it. Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- diff --git a/builtin-clone.c b/builtin-clone.c index 8713128e7..8936a5181 100644 --- a/builtin-clone.c +++ b/builtin-clone.c @@ -215,6 +215,7 @@ static void copy_or_link_directory(char *src, char *dest) die("failed to create link %s\n", dest); } } + closedir(dir); } static const struct ref *clone_local(const char *src_repo,