diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2019-12-14 12:48:33 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2019-12-14 12:48:33 +0000 |
commit | fdc56d9a6dc71e4373acb78116e451ce2a365bf6 (patch) | |
tree | b7e167050837aed36ca14164aee2bdb56b9533df /sys/dev | |
parent | caac8b5b94161a1fce23c8cc03fa98be83ee585f (diff) |
Add sizes for free() in eap(4).
OK tedu@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/eap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c index bc20aa2e9a9..6abf0f7972e 100644 --- a/sys/dev/pci/eap.c +++ b/sys/dev/pci/eap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eap.c,v 1.56 2018/09/14 08:37:34 miko Exp $ */ +/* $OpenBSD: eap.c,v 1.57 2019/12/14 12:48:32 fcambus Exp $ */ /* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */ /* @@ -1471,7 +1471,7 @@ eap_malloc(void *addr, int direction, size_t size, int pool, int flags) return (0); error = eap_allocmem(sc, size, 16, p); if (error) { - free(p, pool, 0); + free(p, pool, sizeof(*p)); return (0); } p->next = sc->sc_dmas; @@ -1489,7 +1489,7 @@ eap_free(void *addr, void *ptr, int pool) if (KERNADDR(p) == ptr) { eap_freemem(sc, p); *pp = p->next; - free(p, pool, 0); + free(p, pool, sizeof(*p)); return; } } |