artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c613704
)
Plug uhidev memory leak during detach.
author
anton
<anton@openbsd.org>
Mon, 8 Nov 2021 07:05:21 +0000
(07:05 +0000)
committer
anton
<anton@openbsd.org>
Mon, 8 Nov 2021 07:05:21 +0000
(07:05 +0000)
Thanks to Damien Couderc <openbsd at petrocore dot eu> for testing and ok
gnezdo@
sys/dev/usb/uhidev.c
patch
|
blob
|
history
diff --git
a/sys/dev/usb/uhidev.c
b/sys/dev/usb/uhidev.c
index
014dc05
..
7e19639
100644
(file)
--- a/
sys/dev/usb/uhidev.c
+++ b/
sys/dev/usb/uhidev.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: uhidev.c,v 1.9
5 2021/09/12 06:58:08
anton Exp $ */
+/* $OpenBSD: uhidev.c,v 1.9
6 2021/11/08 07:05:21
anton Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@
-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);
}