diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2019-12-28 07:55:49 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2019-12-28 07:55:49 +0000 |
commit | b2a2cd7db2df4ee95ee301a9dffe87358f00bdfa (patch) | |
tree | 187d3f26dd1c047fd39895998fc9e4f2f7e9eb30 | |
parent | 5192ca8db6f17a8d91fdfe5b0a20af79923d0102 (diff) |
Add sizes for free() in clct(4).
OK jan@
-rw-r--r-- | sys/dev/pci/cs4281.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c index 98404e94e4b..51b5f480ea3 100644 --- a/sys/dev/pci/cs4281.c +++ b/sys/dev/pci/cs4281.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4281.c,v 1.36 2016/09/19 06:46:44 ratchov Exp $ */ +/* $OpenBSD: cs4281.c,v 1.37 2019/12/28 07:55:48 fcambus Exp $ */ /* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */ /* @@ -1187,7 +1187,7 @@ cs4281_malloc(void *addr, int direction, size_t size, int pool, int flags) error = cs4281_allocmem(sc, size, pool, flags, p); if (error) { - free(p, pool, 0); + free(p, pool, sizeof(*p)); return (0); } @@ -1212,7 +1212,7 @@ cs4281_free(void *addr, void *ptr, int pool) bus_dmamem_unmap(sc->sc_dmatag, p->addr, p->size); bus_dmamem_free(sc->sc_dmatag, p->segs, p->nsegs); *pp = p->next; - free(p, pool, 0); + free(p, pool, sizeof(*p)); return; } } |