From: mikeb Date: Thu, 18 Jan 2018 11:43:20 +0000 (+0000) Subject: Fix an off-by-one uncovered by the recent free(9) change X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=15c2e150ed84627f1fb6ee3ccf65d7a806d42164;p=openbsd Fix an off-by-one uncovered by the recent free(9) change From canacar@, thanks! --- diff --git a/sys/dev/pv/pvbus.c b/sys/dev/pv/pvbus.c index 902221ec6f5..885cf702c20 100644 --- a/sys/dev/pv/pvbus.c +++ b/sys/dev/pv/pvbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvbus.c,v 1.17 2017/06/22 06:21:12 jmatthew Exp $ */ +/* $OpenBSD: pvbus.c,v 1.18 2018/01/18 11:43:20 mikeb Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -480,8 +480,8 @@ pvbusioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) break; } - free(key, M_TEMP, keylen); - free(value, M_TEMP, valuelen); + free(key, M_TEMP, keylen + 1); + free(value, M_TEMP, valuelen + 1); return (error); }