Correct few bzero()s.

MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2006-07-22 13:14:11 +00:00
parent f9207803a8
commit 9f5dc73906
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=160573

View File

@ -487,16 +487,16 @@ padlock_freesession(void *arg __unused, uint64_t tid)
}
TAILQ_REMOVE(&sc->sc_sessions, ses, ses_next);
if (ses->ses_ictx != NULL) {
bzero(ses->ses_ictx, sizeof(ses->ses_ictx));
bzero(ses->ses_ictx, ses->ses_axf->ctxsize);
free(ses->ses_ictx, M_CRYPTO_DATA);
ses->ses_ictx = NULL;
}
if (ses->ses_octx != NULL) {
bzero(ses->ses_octx, sizeof(ses->ses_octx));
bzero(ses->ses_ictx, ses->ses_axf->ctxsize);
free(ses->ses_octx, M_CRYPTO_DATA);
ses->ses_octx = NULL;
}
bzero(ses, sizeof(ses));
bzero(ses, sizeof(*ses));
ses->ses_used = 0;
TAILQ_INSERT_TAIL(&sc->sc_sessions, ses, ses_next);
mtx_unlock(&sc->sc_sessions_mtx);