Skip to content

Commit 9dd75f8

Browse files
Fix other code given so_count change.
1 parent 5d461ee commit 9dd75f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

usrsctplib/user_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ static void
227227
sodealloc(struct socket *so)
228228
{
229229

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

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

0 commit comments

Comments
 (0)