From: Johannes Sixt Date: Wed, 24 Jan 2007 15:03:42 +0000 (+0100) Subject: Add a missing fork() error check. X-Git-Tag: v1.5.0-rc3~17 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f8306418a687b0aa617b29232763fd2c195215ba;p=git.git Add a missing fork() error check. Signed-off-by: Junio C Hamano --- diff --git a/send-pack.c b/send-pack.c index cd478dd82..33e69dbe1 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