diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-13 20:05:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-13 20:05:17 -0700 |
commit | 5ccdf4cef212183597a0893c23c91da2ded80694 (patch) | |
tree | cac4ec90b4e287f37783c7befc91071f5f54aaeb /clone-pack.c | |
parent | a87e8be2aece466e3f41dfde81c80709e1d56cd3 (diff) | |
download | git-5ccdf4cef212183597a0893c23c91da2ded80694.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clone-pack.c b/clone-pack.c index 8f5209cfd5..252fb80efd 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"); |