Hi, Upon uhidev detach, free the list of sub devices. Comments? OK?
diff --git sys/dev/usb/uhidev.c sys/dev/usb/uhidev.c
index 014dc052c1c..5fe2f702e21 100644
--- sys/dev/usb/uhidev.c
+++ sys/dev/usb/uhidev.c
@@ -451,6 +451,7 @@ uhidev_detach(struct device *self, int flags)
sc->sc_subdevs[i] = NULL;
}
+ free(sc->sc_subdevs, M_USBDEV, sc->sc_nrepid * sizeof(struct uhidev *));
return (rv);
}
