Skip to content

Commit

Permalink
Fix other code given so_count change.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLennox committed Apr 17, 2024
1 parent c493415 commit 6a60d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usrsctplib/user_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static void
sodealloc(struct socket *so)
{

KASSERT(so->so_count == 0, ("sodealloc(): so_count %d", so->so_count));
KASSERT(so->so_count <= 0, ("sodealloc(): so_count %d", so->so_count));
KASSERT(so->so_pcb == NULL, ("sodealloc(): so_pcb != NULL"));

SOCKBUF_COND_DESTROY(&so->so_snd);
Expand All @@ -254,7 +254,7 @@ sofree(struct socket *so)
/* SS_NOFDREF unset in accept call. this condition seems irrelevant
* for __Userspace__...
*/
if (so->so_count != 0 ||
if (so->so_count > 0 ||
(so->so_state & SS_PROTOREF) || (so->so_qstate & SQ_COMP)) {
SOCK_UNLOCK(so);
ACCEPT_UNLOCK();
Expand Down

0 comments on commit 6a60d87

Please sign in to comment.