X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=connect.c;h=52d709e58d53f053ec00bfb9f31501684cbaf0e5;hp=eca94f75485ecf6ac585e3e6c8d12f7978b24f06;hb=c9bc159d7f41e2916830b05529c1ce06a81d975f;hpb=fb6a9f93d39e4e5fdb83673a927f71a34e9fb7c0 diff --git a/connect.c b/connect.c index eca94f75..52d709e5 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));