From f8306418a687b0aa617b29232763fd2c195215ba Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 24 Jan 2007 16:03:42 +0100 Subject: [PATCH] Add a missing fork() error check. Signed-off-by: Junio C Hamano --- send-pack.c | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.26.2