From 75387f30981844d7052285a8562dc624afd5df59 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Mon, 13 May 2019 21:29:29 +0000 Subject: free(9) sizes. From Jan Klemkow, ok tedu@ --- sys/dev/pci/sv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/sv.c b/sys/dev/pci/sv.c index ca07e26601f..52c188d4bc4 100644 --- a/sys/dev/pci/sv.c +++ b/sys/dev/pci/sv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sv.c,v 1.34 2016/09/19 06:46:44 ratchov Exp $ */ +/* $OpenBSD: sv.c,v 1.35 2019/05/13 21:29:28 mpi Exp $ */ /* * Copyright (c) 1998 Constantine Paul Sapuntzakis @@ -1286,7 +1286,7 @@ sv_malloc(void *addr, int direction, size_t size, int pool, int flags) return (0); error = sv_allocmem(sc, size, 16, p); if (error) { - free(p, pool, 0); + free(p, pool, sizeof(*p)); return (0); } p->next = sc->sc_dmas; @@ -1304,7 +1304,7 @@ sv_free(void *addr, void *ptr, int pool) if (KERNADDR(*p) == ptr) { sv_freemem(sc, *p); *p = (*p)->next; - free(*p, pool, 0); + free(*p, pool, sizeof(**p)); return; } } -- cgit v1.2.3