Date: Mon, 2 Apr 2007 19:02:01 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117208 for review Message-ID: <200704021902.l32J21tV031883@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117208 Change 117208 by jhb@jhb_mutex on 2007/04/02 19:01:15 Don't call soclose() on the sockets during failure once the file descriptors are fully constructed. Affected files ... .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#100 edit Differences ... ==== //depot/projects/smpng/sys/kern/uipc_syscalls.c#100 (text+ko) ==== @@ -664,6 +664,7 @@ fp2->f_ops = &socketops; fp2->f_type = DTYPE_SOCKET; FILE_UNLOCK(fp2); + so1 = so2 = NULL; error = copyout(sv, uap->rsv, 2 * sizeof (int)); if (error) goto free4; @@ -677,9 +678,11 @@ fdclose(fdp, fp1, sv[0], td); fdrop(fp1, td); free2: - (void)soclose(so2); + if (so2 != NULL) + (void)soclose(so2); free1: - (void)soclose(so1); + if (so1 != NULL) + (void)soclose(so1); done2: NET_UNLOCK_GIANT(); return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704021902.l32J21tV031883>