Bugfix: The ucom detach function is sometimes called on zeroed structures.
Check for this case and just return, so that the UCOM unit number zero is not accidentially freed. Submitted by: Danish FreeBSD user at EuroBSDcon 2011 MFC after: 3 days
This commit is contained in:
parent
d78e594bc9
commit
f6c6639af8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226219
@ -289,6 +289,9 @@ ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc)
|
||||
{
|
||||
uint32_t subunit;
|
||||
|
||||
if (ssc->sc_subunits == 0)
|
||||
return; /* not initialized */
|
||||
|
||||
usb_proc_drain(&ssc->sc_tq);
|
||||
|
||||
for (subunit = 0; subunit < ssc->sc_subunits; subunit++) {
|
||||
|
Loading…
Reference in New Issue
Block a user