1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

- Fix a bunch of malloc calls where the M_FLAG is incorrectly used; it

should be M_WAITOK.

Spotted by: des
This commit is contained in:
Andrew R. Reiter 2001-12-07 17:59:15 +00:00
parent a94da0a9f3
commit 1f4bb1673d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87503

View File

@ -535,12 +535,12 @@ digi_init(struct digi_softc *sc)
if (sc->ports)
free(sc->ports, M_TTYS);
sc->ports = malloc(sizeof(struct digi_p) * sc->numports,
M_TTYS, M_WAIT | M_ZERO);
M_TTYS, M_WAITOK | M_ZERO);
if (sc->ttys)
free(sc->ttys, M_TTYS);
sc->ttys = malloc(sizeof(struct tty) * sc->numports,
M_TTYS, M_WAIT | M_ZERO);
M_TTYS, M_WAITOK | M_ZERO);
/*
* XXX Should read port 0xc90 for an array of 2byte values, 1 per
@ -1048,19 +1048,19 @@ digi_loadmoduledata(struct digi_softc *sc)
sc->bios.size = digi_mod->dm_bios.size;
if (sc->bios.size != 0 && digi_mod->dm_bios.data != NULL) {
sc->bios.data = malloc(sc->bios.size, M_TTYS, M_WAIT);
sc->bios.data = malloc(sc->bios.size, M_TTYS, M_WAITOK);
bcopy(digi_mod->dm_bios.data, sc->bios.data, sc->bios.size);
}
sc->fep.size = digi_mod->dm_fep.size;
if (sc->fep.size != 0 && digi_mod->dm_fep.data != NULL) {
sc->fep.data = malloc(sc->fep.size, M_TTYS, M_WAIT);
sc->fep.data = malloc(sc->fep.size, M_TTYS, M_WAITOK);
bcopy(digi_mod->dm_fep.data, sc->fep.data, sc->fep.size);
}
sc->link.size = digi_mod->dm_link.size;
if (sc->link.size != 0 && digi_mod->dm_link.data != NULL) {
sc->link.data = malloc(sc->link.size, M_TTYS, M_WAIT);
sc->link.data = malloc(sc->link.size, M_TTYS, M_WAITOK);
bcopy(digi_mod->dm_link.data, sc->link.data, sc->link.size);
}