summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
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 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