diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-04-03 08:00:43 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-04-03 08:00:43 +0000 |
commit | cfc5540708475d2376c6c4095846dfd86177cc25 (patch) | |
tree | f85a720ec59fbb85e3a6945df503f2f391c8d75e | |
parent | d996f4362efd28d814bac947f37c403ab2462c7e (diff) |
dont allocate with M_TEMP and then free with M_DEVBUF. made even worse that
this was done for every sensor update, which really screwed up the memory
stats.
noticed by deraadt@
-rw-r--r-- | sys/dev/ic/mpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index ffe1f265731..8239562bbc0 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.135 2010/03/23 01:57:19 krw Exp $ */ +/* $OpenBSD: mpi.c,v 1.136 2010/04/03 08:00:42 dlg Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -2729,7 +2729,7 @@ mpi_bio_get_pg0_raid(struct mpi_softc *sc, int id) /* replace current buffer with new one */ len = sizeof *rpg0 + sc->sc_vol_page->max_physdisks * sizeof(struct mpi_cfg_raid_vol_pg0_physdisk); - rpg0 = malloc(len, M_TEMP, M_WAITOK | M_CANFAIL); + rpg0 = malloc(len, M_DEVBUF, M_WAITOK | M_CANFAIL); if (rpg0 == NULL) { printf("%s: can't get memory for RAID page 0, " "bio disabled\n", DEVNAME(sc)); |