summaryrefslogtreecommitdiff
path: root/sys/dev/usb/utwitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/utwitch.c')
-rw-r--r--sys/dev/usb/utwitch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/utwitch.c b/sys/dev/usb/utwitch.c
index beb35487ea6..c24680f4a5a 100644
--- a/sys/dev/usb/utwitch.c
+++ b/sys/dev/usb/utwitch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utwitch.c,v 1.16 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: utwitch.c,v 1.17 2017/04/08 02:57:25 deraadt Exp $ */
/*
* Copyright (c) 2010 Yojiro UO <yuo@nui.org>
@@ -192,7 +192,7 @@ utwitch_detach(struct device *self, int flags)
uhidev_close(&sc->sc_hdev);
if (sc->sc_ibuf != NULL) {
- free(sc->sc_ibuf, M_USBDEV, 0);
+ free(sc->sc_ibuf, M_USBDEV, sc->sc_ilen);
sc->sc_ibuf = NULL;
}