1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Fix memory leak which occurs when crypto.ko module is unloaded.

Discussed with:	sam
MFC after	3 days
This commit is contained in:
Pawel Jakub Dawidek 2006-03-28 08:33:30 +00:00
parent 1259a17acd
commit 4b465da26f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157205

View File

@ -1028,3 +1028,12 @@ swcr_init(void)
#undef REGISTER
}
SYSINIT(cryptosoft_init, SI_SUB_PSEUDO, SI_ORDER_ANY, swcr_init, NULL)
static void
swcr_uninit(void)
{
if (swcr_sessions != NULL)
FREE(swcr_sessions, M_CRYPTO_DATA);
}
SYSUNINIT(cryptosoft_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, swcr_uninit, NULL);