aboutsummaryrefslogtreecommitdiff
path: root/clone-pack.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-13 20:05:17 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-13 20:05:17 -0700
commit5ccdf4cef212183597a0893c23c91da2ded80694 (patch)
treecac4ec90b4e287f37783c7befc91071f5f54aaeb /clone-pack.c
parenta87e8be2aece466e3f41dfde81c80709e1d56cd3 (diff)
downloadgit-5ccdf4cef212183597a0893c23c91da2ded80694.tar.gz
git-5ccdf4cef212183597a0893c23c91da2ded80694.tar.xz
Fix the "close before dup" bug in clone-pack too
Same issue as git-fetch-pack.
Diffstat (limited to 'clone-pack.c')
-rw-r--r--clone-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clone-pack.c b/clone-pack.c
index 8f5209cfd..252fb80ef 100644
--- a/clone-pack.c
+++ b/clone-pack.c
@@ -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");