From c9bc159d7f41e2916830b05529c1ce06a81d975f Mon Sep 17 00:00:00 2001 From: Paul T Darga Date: Thu, 8 Jun 2006 14:14:47 -0400 Subject: check for error return from fork() Trivial fixup for fork() callsites which do not check for errors. Signed-off-by: Paul T Darga Signed-off-by: Junio C Hamano --- connect.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'connect.c') diff --git a/connect.c b/connect.c index eca94f7548..52d709e58d 100644 --- a/connect.c +++ b/connect.c @@ -657,6 +657,8 @@ int git_connect(int fd[2], char *url, const char *prog) if (pipe(pipefd[0]) < 0 || pipe(pipefd[1]) < 0) die("unable to create pipe pair for communication"); pid = fork(); + if (pid < 0) + die("unable to fork"); if (!pid) { snprintf(command, sizeof(command), "%s %s", prog, sq_quote(path)); -- cgit v1.2.3