Skip to content

Commit

Permalink
builtin-clone.c: Need to closedir() in copy_or_link_directory()
Browse files Browse the repository at this point in the history
So not to leak file descriptors, close the directory after opening it.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed May 19, 2008
1 parent a73bc12 commit 689ef4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin-clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 689ef4d

Please sign in to comment.