From 2a8e093d82d584baaf5574e01e0850a52783b188 Mon Sep 17 00:00:00 2001 From: fcambus Date: Sat, 9 Dec 2017 16:39:54 +0000 Subject: [PATCH] Add sizes for free() in the AMD PowerNow! K8 driver. OK deraadt@, sthen@, visa@ --- sys/arch/amd64/amd64/powernow-k8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); } -- 2.20.1