summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-01-24 15:03:42 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-30 10:30:25 (GMT)
commitf8306418a687b0aa617b29232763fd2c195215ba (patch)
tree144f82f380b2307416dc6ae57e10c8d307cef1dd
parent1732a1fd942f00b9a77a47acc09df0cd62c770bd (diff)
downloadgit-f8306418a687b0aa617b29232763fd2c195215ba.zip
git-f8306418a687b0aa617b29232763fd2c195215ba.tar.gz
git-f8306418a687b0aa617b29232763fd2c195215ba.tar.bz2
Add a missing fork() error check.
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--send-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index cd478dd..33e69db 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -25,6 +25,8 @@ static int pack_objects(int fd, struct ref *refs)
if (pipe(pipe_fd) < 0)
return error("send-pack: pipe failed");
pid = fork();
+ if (pid < 0)
+ return error("send-pack: unable to fork git-pack-objects");
if (!pid) {
/*
* The child becomes pack-objects --revs; we feed