diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-01-18 11:43:21 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-01-18 11:43:21 +0000 |
commit | b41b678f4fb5916fc524fb310de808ff128b3339 (patch) | |
tree | f0be7f0b87d8daaf5f70127bfddcdd0518229451 /sys/dev/pv | |
parent | 9f9fca340ca9e7f2a717b30e2eef7b87c7794785 (diff) |
Fix an off-by-one uncovered by the recent free(9) change
From canacar@, thanks!
Diffstat (limited to 'sys/dev/pv')
-rw-r--r-- | sys/dev/pv/pvbus.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 <reyk@openbsd.org> @@ -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); } |