summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-09-04 10:45:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-09-04 10:45:30 +0000
commitfa011f38546161218d878c25c58ee1fed5aa53e8 (patch)
tree4e23b748a608cd95ba2bad9253a5a62ac55e3ab8 /sys
parentfcf81dc4a6a387493087e1a98924fc33193e3810 (diff)
correct the size passed to free in iatp_write_reg
ok jcs@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2c/iatp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2c/iatp.c b/sys/dev/i2c/iatp.c
index 618e946b008..d97a6de36ba 100644
--- a/sys/dev/i2c/iatp.c
+++ b/sys/dev/i2c/iatp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iatp.c,v 1.1 2016/09/01 10:04:51 jcs Exp $ */
+/* $OpenBSD: iatp.c,v 1.2 2016/09/04 10:45:29 jsg Exp $ */
/*
* Atmel maXTouch i2c touchscreen/touchpad driver
* Copyright (c) 2016 joshua stein <jcs@openbsd.org>
@@ -690,7 +690,7 @@ iatp_write_reg(struct iatp_softc *sc, uint16_t reg, size_t len, void *val)
iic_release_bus(sc->sc_tag, 0);
- free(cmd, M_DEVBUF, sizeof(len + 2));
+ free(cmd, M_DEVBUF, len + 2);
return ret;
}