artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3387ab8
)
Make sure to call uhidev_close() upon detach, plug another xfer leak.
author
mpi
<mpi@openbsd.org>
Tue, 29 Apr 2014 12:53:33 +0000
(12:53 +0000)
committer
mpi
<mpi@openbsd.org>
Tue, 29 Apr 2014 12:53:33 +0000
(12:53 +0000)
sys/dev/usb/ugold.c
patch
|
blob
|
history
diff --git
a/sys/dev/usb/ugold.c
b/sys/dev/usb/ugold.c
index
3679424
..
56d1d36
100644
(file)
--- a/
sys/dev/usb/ugold.c
+++ b/
sys/dev/usb/ugold.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ugold.c,v 1.
5 2014/04/15 09:14:27
mpi Exp $ */
+/* $OpenBSD: ugold.c,v 1.
6 2014/04/29 12:53:33
mpi Exp $ */
/*
* Copyright (c) 2013 Takayoshi SASANO <sasano@openbsd.org>
@@
-183,6
+183,9
@@
ugold_detach(struct device *self, int flags)
for (i = 0; i < sc->sc_num_sensors; i++)
sensor_detach(&sc->sc_sensordev, &sc->sc_sensor[i]);
+ if (sc->sc_hdev.sc_state & UHIDEV_OPEN)
+ uhidev_close(&sc->sc_hdev);
+
return (0);
}