summaryrefslogtreecommitdiff
path: root/sys/dev/usb/umsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/umsm.c')
-rw-r--r--sys/dev/usb/umsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c
index bd734e2ff77..1d4450a85fd 100644
--- a/sys/dev/usb/umsm.c
+++ b/sys/dev/usb/umsm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umsm.c,v 1.108 2016/12/12 04:26:29 jsg Exp $ */
+/* $OpenBSD: umsm.c,v 1.109 2017/04/08 02:57:25 deraadt Exp $ */
/*
* Copyright (c) 2008 Yojiro UO <yuo@nui.org>
@@ -436,7 +436,7 @@ umsm_detach(struct device *self, int flags)
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
- free(sc->sc_intr_buf, M_USBDEV, 0);
+ free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
sc->sc_intr_pipe = NULL;
}
@@ -496,7 +496,7 @@ umsm_close(void *addr, int portno)
printf("%s: close interrupt pipe failed: %s\n",
sc->sc_dev.dv_xname,
usbd_errstr(err));
- free(sc->sc_intr_buf, M_USBDEV, 0);
+ free(sc->sc_intr_buf, M_USBDEV, sc->sc_isize);
sc->sc_intr_pipe = NULL;
}
}