From f8306418a687b0aa617b29232763fd2c195215ba Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 24 Jan 2007 16:03:42 +0100 Subject: Add a missing fork() error check. Signed-off-by: Junio C Hamano 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 -- cgit v0.10.2-6-g49f6