Add a missing fork() error check.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Sixt committed
Jan 24, 2007 at 16:03 UTC
f8306418a687b0aa617b29232763fd2c195215ba
1 file changed
+2
send-pack.c
+2
@@ -25,6 +25,8 @@ static int pack_objects(int fd, struct ref *refs)
25
if (pipe(pipe_fd) < 0)
26
return error("send-pack: pipe failed");
27
pid = fork();
28
+ if (pid < 0)
29
+ return error("send-pack: unable to fork git-pack-objects");
30
if (!pid) {
31
/*
32
* The child becomes pack-objects --revs; we feed