diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index f67347b2ea07..b5e907a1dabb 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1225,9 +1225,9 @@ sosend_generic(so, addr, uio, top, control, flags, td) goto release; } error = sbwait(&so->so_snd); + SOCKBUF_UNLOCK(&so->so_snd); if (error) goto release; - SOCKBUF_UNLOCK(&so->so_snd); goto restart; } SOCKBUF_UNLOCK(&so->so_snd);