summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJohannes Sixt <johannes.sixt@telecom.at>2007-01-24 16:03:42 +0100
committerJunio C Hamano <junkio@cox.net>2007-01-30 02:30:25 -0800
commitf8306418a687b0aa617b29232763fd2c195215ba (patch)
tree144f82f380b2307416dc6ae57e10c8d307cef1dd /send-pack.c
parent1732a1fd942f00b9a77a47acc09df0cd62c770bd (diff)
downloadgit-f8306418a687b0aa617b29232763fd2c195215ba.tar.gz
Add a missing fork() error check.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index cd478dd82f..33e69dbe18 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