-/* $OpenBSD: uhidev.c,v 1.59 2014/04/24 09:40:28 mpi Exp $ */
+/* $OpenBSD: uhidev.c,v 1.60 2014/04/29 12:47:33 mpi Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
usbd_free_xfer(sc->sc_owxfer);
sc->sc_owxfer = NULL;
}
+ if (sc->sc_ixfer != NULL) {
+ usbd_free_xfer(sc->sc_ixfer);
+ sc->sc_ixfer = NULL;
+ }
return (error);
}
return;
DPRINTF(("uhidev_close: close pipe\n"));
- if (sc->sc_oxfer != NULL)
+ if (sc->sc_oxfer != NULL) {
usbd_free_xfer(sc->sc_oxfer);
+ sc->sc_oxfer = NULL;
+ }
- if (sc->sc_owxfer != NULL)
+ if (sc->sc_owxfer != NULL) {
usbd_free_xfer(sc->sc_owxfer);
+ sc->sc_owxfer = NULL;
+ }
+
+ if (sc->sc_ixfer != NULL) {
+ usbd_free_xfer(sc->sc_ixfer);
+ sc->sc_ixfer = NULL;
+ }
/* Disable interrupts. */
if (sc->sc_opipe != NULL) {