Skip to content

Commit

Permalink
Fix the "close before dup" bug in clone-pack too
Browse files Browse the repository at this point in the history
Same issue as git-fetch-pack.
  • Loading branch information
Linus Torvalds committed Jul 14, 2005
1 parent a87e8be commit 5ccdf4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clone-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ static int clone_pack(int fd[2], int nr_match, char **match)
if (pid < 0)
die("git-clone-pack: unable to fork off git-unpack-objects");
if (!pid) {
close(fd[1]);
dup2(fd[0], 0);
close(fd[0]);
close(fd[1]);
execlp("git-unpack-objects", "git-unpack-objects",
quiet ? "-q" : NULL, NULL);
die("git-unpack-objects exec failed");
Expand Down

0 comments on commit 5ccdf4c

Please sign in to comment.