summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-05-13 21:29:29 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-05-13 21:29:29 +0000
commit75387f30981844d7052285a8562dc624afd5df59 (patch)
treeddc64f93cb38f3fc543b62b35fdf9d724b5b5d5f
parent69b0b0af7e5c464c2e9af522067fd3b35fe4b9b2 (diff)
free(9) sizes.
From Jan Klemkow, ok tedu@
-rw-r--r--sys/dev/pci/sv.c6
1 files changed, 3 insertions, 3 deletions
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;
}
}