summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Cambus <fcambus@cvs.openbsd.org>2019-12-04 20:21:36 +0000
committerFrederic Cambus <fcambus@cvs.openbsd.org>2019-12-04 20:21:36 +0000
commitf5d816519f08d290bba0f908568993a247cbcdb5 (patch)
tree764b72009aa93668d1647b36d78af542329a6587
parent8d2a1f463deafb37cee374a1dce6b761960d03be (diff)
Add sizes for free() in autri(4).
OK mpi@
-rw-r--r--sys/dev/pci/autri.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index 51a91821811..917af10058f 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.42 2016/12/20 15:45:29 ratchov Exp $ */
+/* $OpenBSD: autri.c,v 1.43 2019/12/04 20:21:35 fcambus Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -995,7 +995,7 @@ autri_malloc(void *addr, int direction, size_t size, int pool, int flags)
#endif
error = autri_allocmem(sc, size, 0x10000, p);
if (error) {
- free(p, pool, 0);
+ free(p, pool, sizeof(*p));
return NULL;
}
@@ -1014,7 +1014,7 @@ autri_free(void *addr, void *ptr, int pool)
if (KERNADDR(p) == ptr) {
autri_freemem(sc, p);
*pp = p->next;
- free(p, pool, 0);
+ free(p, pool, sizeof(*p));
return;
}
}