diff options
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index b647766cf258..18ecf1409fd7 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1063,8 +1063,10 @@ solisten_proto(struct socket *so, int backlog) sbrcv_timeo = so->so_rcv.sb_timeo; sbsnd_timeo = so->so_snd.sb_timeo; - sbdestroy(so, SO_SND); - sbdestroy(so, SO_RCV); + if (!(so->so_proto->pr_flags & PR_SOCKBUF)) { + sbdestroy(so, SO_SND); + sbdestroy(so, SO_RCV); + } #ifdef INVARIANTS bzero(&so->so_rcv, |