From: fcambus Date: Sat, 9 Dec 2017 16:39:54 +0000 (+0000) Subject: Add sizes for free() in the AMD PowerNow! K8 driver. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2a8e093d82d584baaf5574e01e0850a52783b188;p=openbsd Add sizes for free() in the AMD PowerNow! K8 driver. OK deraadt@, sthen@, visa@ --- diff --git a/sys/arch/amd64/amd64/powernow-k8.c b/sys/arch/amd64/amd64/powernow-k8.c index e41e1558337..0183c14c933 100644 --- a/sys/arch/amd64/amd64/powernow-k8.c +++ b/sys/arch/amd64/amd64/powernow-k8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: powernow-k8.c,v 1.26 2017/09/08 05:36:51 deraadt Exp $ */ +/* $OpenBSD: powernow-k8.c,v 1.27 2017/12/09 16:39:54 fcambus Exp $ */ /* * Copyright (c) 2004 Martin VĂ©giard. * Copyright (c) 2004-2005 Bruno Ducrot @@ -380,7 +380,7 @@ k8pnow_acpi_pss_changed(struct acpicpu_pss * pss, int npss) if (needtran) k8pnow_transition(nstate, curs); - free(cstate, M_DEVBUF, 0); + free(cstate, M_DEVBUF, sizeof(*cstate)); k8pnow_current_state = nstate; } @@ -510,5 +510,5 @@ k8_powernow_init(struct cpu_info *ci) setperf_prio = 1; return; } - free(cstate, M_DEVBUF, 0); + free(cstate, M_DEVBUF, sizeof(*cstate)); }