From f5d816519f08d290bba0f908568993a247cbcdb5 Mon Sep 17 00:00:00 2001 From: Frederic Cambus Date: Wed, 4 Dec 2019 20:21:36 +0000 Subject: Add sizes for free() in autri(4). OK mpi@ --- sys/dev/pci/autri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') 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; } } -- cgit v1.2.3