When freeing session, restore its ID after zeroing memory.
Bug tracked down by: Patrick Lamaiziere <patfbsd@davenulle.org>
This commit is contained in:
parent
7d8b54b5b5
commit
eadca5921d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181474
@ -272,6 +272,7 @@ padlock_freesession(device_t dev, uint64_t tid)
|
|||||||
padlock_hash_free(ses);
|
padlock_hash_free(ses);
|
||||||
bzero(ses, sizeof(*ses));
|
bzero(ses, sizeof(*ses));
|
||||||
ses->ses_used = 0;
|
ses->ses_used = 0;
|
||||||
|
ses->ses_id = sid;
|
||||||
TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
|
TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
|
||||||
rw_wunlock(&sc->sc_sessions_lock);
|
rw_wunlock(&sc->sc_sessions_lock);
|
||||||
return (0);
|
return (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user