diff --git a/sys/crypto/via/padlock.c b/sys/crypto/via/padlock.c index 95351af42e59..34d04c474bbd 100644 --- a/sys/crypto/via/padlock.c +++ b/sys/crypto/via/padlock.c @@ -489,10 +489,12 @@ padlock_freesession(void *arg __unused, uint64_t tid) if (ses->ses_ictx != NULL) { bzero(ses->ses_ictx, sizeof(ses->ses_ictx)); free(ses->ses_ictx, M_CRYPTO_DATA); + ses->ses_ictx = NULL; } if (ses->ses_octx != NULL) { bzero(ses->ses_octx, sizeof(ses->ses_octx)); free(ses->ses_octx, M_CRYPTO_DATA); + ses->ses_octx = NULL; } bzero(ses, sizeof(ses)); ses->ses_used = 0;