summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c/ihidev.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2018-09-20 01:19:56 +0000
committerjsg <jsg@openbsd.org>2018-09-20 01:19:56 +0000
commit1937a0ca0516d00b884d19ce5aa7e35b73e907d1 (patch)
tree968801fcd0c468ef2c15c92d6acb6a6022cf94d4 /sys/dev/i2c/ihidev.c
parentIf getcwd() fails in dinit(), the stat buffer 'swd' is used (diff)
downloadwireguard-openbsd-1937a0ca0516d00b884d19ce5aa7e35b73e907d1.tar.xz
wireguard-openbsd-1937a0ca0516d00b884d19ce5aa7e35b73e907d1.zip
fix a memory leak in ihidev_hid_command()
ok claudio@
Diffstat (limited to 'sys/dev/i2c/ihidev.c')
-rw-r--r--sys/dev/i2c/ihidev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c
index cf183afac9e..b34f97a48f4 100644
--- a/sys/dev/i2c/ihidev.c
+++ b/sys/dev/i2c/ihidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ihidev.c,v 1.17 2018/08/25 18:32:05 jcs Exp $ */
+/* $OpenBSD: ihidev.c,v 1.18 2018/09/20 01:19:56 jsg Exp $ */
/*
* HID-over-i2c driver
*
@@ -361,6 +361,7 @@ ihidev_hid_command(struct ihidev_softc *sc, int hidcmd, void *arg)
DPRINTF(("%s: response report id %d != %d\n",
sc->sc_dev.dv_xname, d, rreq->id));
iic_release_bus(sc->sc_tag, 0);
+ free(tmprep, M_DEVBUF, report_len);
return (1);
}