mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
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);
|
||||
bzero(ses, sizeof(*ses));
|
||||
ses->ses_used = 0;
|
||||
ses->ses_id = sid;
|
||||
TAILQ_INSERT_HEAD(&sc->sc_sessions, ses, ses_next);
|
||||
rw_wunlock(&sc->sc_sessions_lock);
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user