Implify sessions freeing loop.

This commit is contained in:
Pawel Jakub Dawidek 2008-08-09 19:47:19 +00:00
parent a05071e803
commit f422e90330
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181476

View File

@ -152,8 +152,7 @@ padlock_detach(device_t dev)
return (EBUSY);
}
}
for (ses = TAILQ_FIRST(&sc->sc_sessions); ses != NULL;
ses = TAILQ_FIRST(&sc->sc_sessions)) {
while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) {
TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
free(ses, M_PADLOCK);
}