summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2019-12-14 12:37:06 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2019-12-14 12:37:06 +0000
commit902b2f382691cdfc2c440e96976a7edc066794f0 (patch)
treee12f3fe704868d143ccca94c4b3f41c72ddc69ef /sys
parenta8925e3b0cb9b375a7f917eee25d7e16e7b67f58 (diff)
Add sizes for free() in auglx(4).
OK tedu@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/auglx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c
index 4216555a498..84bbf238a5b 100644
--- a/sys/dev/pci/auglx.c
+++ b/sys/dev/pci/auglx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auglx.c,v 1.16 2016/12/20 15:45:29 ratchov Exp $ */
+/* $OpenBSD: auglx.c,v 1.17 2019/12/14 12:37:05 fcambus Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -587,7 +587,7 @@ auglx_allocm(void *v, int direction, size_t size, int pool, int flags)
error = auglx_allocmem(sc, size, PAGE_SIZE, p);
if (error) {
- free(p, pool, 0);
+ free(p, pool, sizeof(*p));
return NULL;
}
@@ -608,7 +608,7 @@ auglx_freem(void *v, void *ptr, int pool)
if (p->addr == ptr) {
auglx_freemem(sc, p);
*pp = p->next;
- free(p, pool, 0);
+ free(p, pool, sizeof(*p));
return;
}
}