On padlock initialization, allocate memory with M_WAITOK.

This commit is contained in:
Pawel Jakub Dawidek 2006-04-12 12:13:34 +00:00
parent 4a531e8dae
commit f3b67db31a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157684

View File

@ -179,11 +179,7 @@ padlock_init(void)
#endif
padlock_sc = sc = malloc(sizeof(*padlock_sc), M_DEVBUF,
M_NOWAIT | M_ZERO);
if (padlock_sc == NULL) {
printf("PADLOCK: Could not allocate memory.\n");
return (ENOMEM);
}
M_WAITOK | M_ZERO);
TAILQ_INIT(&sc->sc_sessions);
sc->sc_sid = 1;