summaryrefslogtreecommitdiffstats
path: root/sys/netipx/spx_usrreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netipx/spx_usrreq.c')
-rw-r--r--sys/netipx/spx_usrreq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c
index 8054c27..dad3cd9 100644
--- a/sys/netipx/spx_usrreq.c
+++ b/sys/netipx/spx_usrreq.c
@@ -1427,7 +1427,9 @@ spx_pcbdetach(struct ipxpcb *ipxp)
cb = ipxtospxpcb(ipxp);
KASSERT(cb != NULL, ("spx_pcbdetach: cb == NULL"));
- for (s = cb->s_q.si_next; s != NULL; s = cb->s_q.si_next) {
+ s = cb->s_q.si_next;
+ while (s != &(cb->s_q)) {
+ s = s->si_next;
remque(s);
m = dtom(s);
m_freem(m);
OpenPOWER on IntegriCloud