We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d461ee commit 9dd75f8Copy full SHA for 9dd75f8
usrsctplib/user_socket.c
@@ -227,7 +227,7 @@ static void
227
sodealloc(struct socket *so)
228
{
229
230
- KASSERT(so->so_count == 0, ("sodealloc(): so_count %d", so->so_count));
+ KASSERT(so->so_count <= 0, ("sodealloc(): so_count %d", so->so_count));
231
KASSERT(so->so_pcb == NULL, ("sodealloc(): so_pcb != NULL"));
232
233
SOCKBUF_COND_DESTROY(&so->so_snd);
@@ -254,7 +254,7 @@ sofree(struct socket *so)
254
/* SS_NOFDREF unset in accept call. this condition seems irrelevant
255
* for __Userspace__...
256
*/
257
- if (so->so_count != 0 ||
+ if (so->so_count > 0 ||
258
(so->so_state & SS_PROTOREF) || (so->so_qstate & SQ_COMP)) {
259
SOCK_UNLOCK(so);
260
ACCEPT_UNLOCK();
0 commit comments