From f2d8c904670cefc4a518ff3b80ffba0bf42d4203 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 11 Sep 2015 09:15:45 +0000 Subject: fairly simple size for free() --- sys/dev/pci/pccbb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/pci/pccbb.c') diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 1a5bcfecbf1..0fad698304b 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.95 2015/07/20 15:44:43 kettenis Exp $ */ +/* $OpenBSD: pccbb.c,v 1.96 2015/09/11 09:15:44 deraadt Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -1576,7 +1576,7 @@ pccbb_intr_disestablish(struct pccbb_softc *sc, void *ih) if (pil == ih) { evcount_detach(&pil->pil_count); *pil_prev = pil->pil_next; - free(pil, M_DEVBUF, 0); + free(pil, M_DEVBUF, sizeof *pil); DPRINTF(("pccbb_intr_disestablish frees one pil\n")); break; } @@ -2681,7 +2681,7 @@ pccbb_winlist_delete(struct pccbb_win_chain_head *head, bus_space_handle_t bsh, } TAILQ_REMOVE(head, chainp, wc_list); - free(chainp, M_DEVBUF, 0); + free(chainp, M_DEVBUF, sizeof *chainp); return 0; } -- cgit v1.2.3