summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-11-17 03:07:11 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-11-17 03:07:11 +0000
commitb1e4abd2464bb5552ab1c65f9574adb61d9a36fd (patch)
treed5160b5791cda1a8cfbbcd3f5e1bd7ea97561c8f /sys/kern/uipc_socket2.c
parent720c992fe1f48db62dda58802c5bca3578be4d38 (diff)
Notes
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index c969e7dec9f9..122fcda00d81 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -210,6 +210,8 @@ sodropablereq(head)
* then we allocate a new structure, propoerly linked into the
* data structure of the original socket, and return this.
* Connstatus may be 0, or SO_ISCONFIRMING, or SO_ISCONNECTED.
+ *
+ * note: the ref count on the socket is 0 on return
*/
struct socket *
sonewconn(head, connstatus)
@@ -246,7 +248,7 @@ sonewconn3(head, connstatus, td)
so->so_cred = crhold(head->so_cred);
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) ||
(*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) {
- sodealloc(so);
+ sotryfree(so);
return ((struct socket *)0);
}