Index: kern_fork.c =================================================================== --- kern_fork.c (wersja 237276) +++ kern_fork.c (kopia robocza) @@ -125,6 +125,11 @@ int error, fd; struct proc *p2; + fd = -1; + error = copyout(&fd, uap->fdp, sizeof(fd)); + if (error != 0) + return (error); + /* * It is necessary to return fd by reference because 0 is a valid file * descriptor number, and the child needs to be able to distinguish @@ -135,7 +140,7 @@ if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; - error = copyout(&fd, uap->fdp, sizeof(fd)); + (void)copyout(&fd, uap->fdp, sizeof(fd)); } return (error); #else